Complete the code to select all columns from a table named 'employees'.
SELECT [1] FROM employees;In SQL, * means select all columns from the table.
Complete the code to filter rows where the 'age' column is greater than 30.
SELECT * FROM users WHERE age [1] 30;
The symbol > means 'greater than' in SQL conditions.
Fix the error in the SQL query to count the number of rows in the 'orders' table.
SELECT COUNT([1]) FROM orders;Using COUNT(*) counts all rows regardless of NULLs.
Fill both blanks to create a query that selects the 'name' and 'salary' columns from 'employees' where salary is at least 50000.
SELECT [1], [2] FROM employees WHERE salary [3] 50000;
Select name and salary columns, and filter salaries greater than or equal to 50000 using >=.
Fill all three blanks to create a query that counts how many employees have a department ID less than 10.
SELECT COUNT([1]) FROM employees WHERE department_id [2] [3];
Use COUNT(*) to count all rows, filter where department_id < 10.