sqlbeginner10 minutes
Fix the SQL Query to Retrieve Employees with Salary Over 50000
In this challenge, you are given a broken SQL query intended to select all employees earning more than 50000. Your task is to identify and fix the bugs so that the query returns the correct results.
Challenge prompt
The following SQL query is supposed to retrieve all employees whose salary is greater than 50000 from the employees table. However, it contains syntax and logical errors that prevent it from working properly. Fix the query so it executes correctly and returns the correct rows.
Guidance
- • Check the SELECT statement syntax for missing or misplaced keywords.
- • Ensure that the WHERE clause condition correctly compares the salary column to 50000.
- • Verify the table name and column names match the given schema.
Hints
- • Remember that column names must be spelled correctly and consistently.
- • The comparison operator should be a standard SQL operator like >, <, =, etc.
Starter code
SELECT * FORM employees WHERE salary => 50000;Expected output
All rows from employees table where salary is greater than 50000
Core concepts
SQL SELECT statementWHERE clauseComparison operators
Challenge a Friend
Send this duel to someone else and see if they can solve it.