Complete the code to select unique city names from the customers table.
SELECT [1] city FROM customers;The DISTINCT keyword returns only unique values in the selected column.
Complete the code to find unique product categories from the products table.
SELECT [1] category FROM products;DISTINCT is the correct keyword to get unique values in SQL.
Fix the error in the query to select unique customer names.
SELECT [1] name FROM customers;The keyword DISTINCT must be used to get unique names. UNIQUE is not valid here.
Fill both blanks to select unique countries and order them alphabetically.
SELECT [1] country FROM customers ORDER BY country [2];
Use DISTINCT to get unique countries and ASC to order them from A to Z.
Fill all three blanks to select unique departments, count employees, and show only those with more than 5 employees.
SELECT [1] department, COUNT(*) AS emp_count FROM employees GROUP BY [2] HAVING emp_count [3] 5;
Use DISTINCT to select unique departments, group by department, and filter groups with employee count greater than 5 using >.