SELECT & WHERE Clause — Concept Check
Questions on SELECT & WHERE Clause. SELECT retrieves columns from tables; WHERE filters rows using comparison, logical, and special operators before any results are returned.
Questions in this quiz
8 questions on SELECT & WHERE Clause — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.You have a query that selects all columns from a large table, causing slow network performance. What should you do to improve it?
- AAdd more WHERE conditions
- BUse SELECT * and add an index
- CProject only necessary columns
- DUse a GROUP BY clause
2.A query uses a column alias in the WHERE clause and fails. Why?
- AAliases are not supported in SQL
- BThe alias is incorrect
- CThe column does not exist
- DWHERE is processed before SELECT
3.When filtering rows in SQL, why is it important to use the WHERE clause early?
- AIt increases the number of rows processed
- BIt reduces the row set before joins and aggregations
- CIt changes the logical query order
- DIt allows use of column aliases
4.A query uses 'SELECT id, salary FROM employees WHERE salary > 75000 AND department_id = 3'. What does this accomplish?
- ASelects all employees
- BGroups employees by department
- CFilters rows with salary over 75000 in department 3
- DSelects employees with salary below 75000
5.In a SQL query, what is the correct order of logical processing?
- ASELECT → WHERE → ORDER BY
- BWHERE → FROM → SELECT
- CSELECT → FROM → WHERE
- DFROM → WHERE → GROUP BY
6.Why might someone incorrectly believe they can use a column alias in a WHERE clause?
- AThey confuse WHERE with ORDER BY
- BThey assume aliases are global
- CThey think WHERE is processed after SELECT
- DThey misunderstand SQL syntax
7.A developer writes a query with 'WHERE status = 'active' OR status = 'trial' AND created_at >= CURRENT_DATE - INTERVAL '30 days''. What is the likely issue?
- AAND binds tighter than OR, causing logic errors
- BOR binds tighter than AND, causing logic errors
- CThe interval syntax is incorrect
- DThe query is missing a GROUP BY clause
8.Which of the following SQL clauses can use column aliases defined in SELECT?
- AWHERE
- BGROUP BY
- CORDER BY
- DFROM