Question 1: SELECT * vs SELECT Column Names
What is the difference between SELECT * and SELECT column_name?
Question 2: WHERE Clause Operators
Which operators can be used in WHERE clause?
Question 3: Basic SELECT with Multiple WHERE Conditions
From an employees table with columns (emp_id, name, department, salary, hire_date), select name and salary for employees in 'Sales' or 'Marketing' departments earning between $40,000 and $80,000.
Question 4: NULL Handling in WHERE Clause
How should NULL values be handled in WHERE clause?
Question 5: SELECT with Pattern Matching and NULL Handling
From a customers table (customer_id, first_name, last_name, email, phone), find all customers whose email ends with '@gmail.com' and phone number is not NULL, showing only first_name and email.
Question 6: SELECT DISTINCT Usage
What does SELECT DISTINCT do?
Question 7: SELECT with Date Range and Ordering
From an orders table (order_id, customer_id, order_date, total_amount, status), select all columns for orders placed in 2023 with status 'Completed', ordered by total_amount in descending order.
Question 8: Wildcard Characters in LIKE
What wildcard characters are used with LIKE operator?
Question 9: ORDER BY with SELECT
How does ORDER BY work with SELECT statement?
Question 10: SELECT with IN Operator and Column Aliases
From a products table (product_id, product_name, category, price, stock_quantity), select product_name as 'Product', price as 'Cost' for products in categories 'Electronics', 'Books', or 'Clothing' where stock is greater than 0.