Problem · Easy · 10 min
Well paid staff
- Easy
- Filtering rows
A company keeps its staff in the table staff. These problems use SQLite.
| Column | Meaning |
|---|---|
id |
The number of the person. It is unique. |
name |
The name of the person. |
team |
The team of the person, for example sales. |
salary |
The monthly salary in euros, as a whole number. |
Write one query that returns the columns name and salary for each person who:
- works in the team
supportor in the teamsales, and - earns at least 4000.
Put the highest salary first. If two people have the same salary, put the name that comes first in the alphabet first.
Tasks
2 to do
Task 1, not checked yet. Return the right rows for the example data.
Task 2, not checked yet. Return the right rows for other data that you cannot see.
Task 1 of 2
Return the right rows for the example data.