Query Employees Table by Date Salary

Find employees who joined before 2020 and earn more than 100000.

sql

SELECT id, name, email, salary, joined_at FROM employees WHERE joined_at < '2020-01-01' AND salary > 100000;

This query selects the "id", "name", "email", "salary", and "joined_at" columns from the "employees" table for records where the "joined_at" date is prior to January 1, 2020, and the "salary" exceeds 100,000.

PromptDB can make mistakes. Please double-check responses.