Practice SQL SELECT Interview Questions
The SELECT statement defines what the database returns — which columns, in what form, under what name. It is the first thing every interviewer tests, and where most candidates lose points through imprecision: wrong column names, unnecessary wildcards, missing aliases.
A strong SELECT answer is explicit, clean, and returns exactly what was asked and nothing more.
Syntax
SELECT column1, column2
FROM table_name;
-- With alias
SELECT column1 AS label, expression AS label
FROM table_name;
-- All columns (avoid in interviews unless specifically asked)
SELECT *
FROM table_name;Key points:
- Name columns explicitly in interviews.
SELECT *is acceptable only when the question asks for all columns ASrenames the output column. Useful with expressions, aggregates, and long column names- Expressions in
SELECTare evaluated before results are returned. Arithmetic, string operations, and functions are all valid here SELECTwithoutFROMis valid SQL. Useful for evaluating expressions or constants
Example — run it and see
SELECT
product_id,
name,
price,
price * 1.18 AS price_with_tax
FROM products
ORDER BY price DESC
LIMIT 5;Practice Questions
Q3
Fetch customer names and email addresses
Q4
Get all columns from the orders table
Q5
Show product name and price with 18% tax applied
Q6
List order ID and customer ID with aliases
Q7
Retrieve product ID, name, category, and price
Q8
Calculate discounted order value at 10% off okay
Q9
List customers with their city and country
Q10
Fetch item-level detail from order items