Helix Systems' compensation committee is reviewing high-band salary records before the annual pay review cycle.
Write a query to return the employee ID and salary amount for every record at or above $80,000.
Assumptions:
- The
salariestable contains a salary history record per employee per change — an employee with multiple raises has multiple rows here. - The
amountcolumn records the dollar amount of each salary record.
Output:
- One row per qualifying salary record, with columns
employee_idandamount.
Schema · hr 4 tables
Run previews · Check grades
Write a query, then run it to see results here.
Worked solution Try it yourself first
SELECT
employee_id,
amount
FROM
salaries
WHERE
amount >= 80000 The shape
The >= operator includes the boundary itself, so a salary record at exactly $80,000 qualifies for the committee's high-band review. Strict > would have quietly excluded it.
Clause by clause
SELECT employee_id, amountreturns the employee identifier and the salary value for each qualifying record. Some employees appear more than once because the table holds a row per salary change — that's by design; the committee wants every high-band record, not a summary per person.FROM salariesis the source: the full salary history for everyone at Helix Systems.WHERE amount >= 80000keeps every row whoseamountis at least $80,000. The literal80000has no quotes because it's a number, and no comma because SQL number literals don't use thousands separators.
Why >= and not >
The phrasing in the prompt is "at or above $80,000." That includes the threshold itself. Strict > would mean "above $80,000," which would drop any salary record sitting exactly at the boundary. With the table holding several records right at common pay-band cutoffs, the difference between >= and > lands directly on the count.
The choice comes down to reading the prompt carefully. "At or above," "$80,000 and up," and "$80,000 or more" all mean inclusive — >=. "Above" or "more than" without the word "or" means strict — >. Same pattern in the other direction: "at or below" is <=, "below" or "less than" is <. The wording in the business request dictates which operator to reach for.
You practiced an inclusive comparison (>=) so the threshold value itself qualifies. Inclusive vs. exclusive comparison is the recurring choice anytime a filter applies to a numeric boundary.