First 8 salary changes since June 1, 2024, from 150000
Level: Junior50 XP
Instructions
Among the salary_history records with changed_at on or after June 1, 2024 and salary at least 150000, select the 8 earliest by changed_at. Select employee_id, changed_at and salary; sort by changed_at ascending, for equal dates by employee_id ascending.
Hints
Each next one is more detailed and costs more
Query
Result
Click Run to see the query result, or Check to submit your solution.
Dataset schema
Exactly oneZero or oneZero or more
Table relationships
- N:1Many-to-one
employees.→department_id departments.id - N:1Many-to-one
employees.→manager_id employees.id - N:1Many-to-one
departments.→parent_id departments.id - N:1Many-to-one
salary_history.→employee_id employees.id
Table data
PostgreSQL
Select a table in the diagram or list to view its rows.