Basic SQL Queries
Aggregate Functions
Joins
Data Manipulation
Advanced SQL Concepts
100

What SQL keyword is used to retrieve data from a database?

What is SELECT?

100

Which SQL function is used to find the average value of a column?

What is AVG()?

100

What type of SQL join returns only the rows that have matching values in both tables?

What is INNER JOIN?

100

Which SQL statement is used to insert new records into a table?

What is INSERT INTO?

100

What SQL command is used to create a new database?

What is CREATE DATABASE?

200

Which SQL clause is used to filter records based on a condition?

What is WHERE?

200

Which SQL function returns the highest value in a column?

What is MAX()?

200

Which SQL join returns all rows from the left table, and the matched rows from the right table?

What is LEFT JOIN?

200

How do you update a specific column in a table for a given record?

What is UPDATE?

200

What is a primary key in a database?

What is a column or a set of columns that uniquely identifies each record in a table?

300

Which SQL operator is used to sort the result set in ascending order?

What is ORDER BY ASC?

300

Which SQL function counts the number of rows in a table?

What is COUNT()?

300

Which SQL join returns all rows from the right table, and the matched rows from the left table?

What is RIGHT JOIN?

300

What SQL statement is used to remove data from a table?

What is DELETE?

300

Which SQL constraint ensures that a column must have a value (no NULL values)?

What is NOT NULL?

400

How do you limit the number of rows returned in an SQL query?

What is LIMIT?

400

Which SQL function calculates the sum of a column's values?

What is SUM()?

400

Which SQL join returns all rows when there is a match in one of the tables?

What is FULL OUTER JOIN?

400

Which SQL keyword is used to add new columns to an existing table?

What is ALTER TABLE?

400

What SQL clause is used to group rows that have the same values into summary rows?

What is GROUP BY?

500

What is the correct SQL syntax to select all columns from a table named "Customers"?

What is SELECT * FROM Customers;?

500

Which SQL function returns the lowest value in a column?

What is MIN()?

500

How would you write a query that combines data from two tables, "Orders" and "Customers," using an INNER JOIN on the column "customer_id"?

What is SELECT * FROM Orders INNER JOIN Customers ON Orders.customer_id = Customers.customer_id;?

500

Which SQL statement removes a table from a database permanently?

What is DROP TABLE?

500

Which SQL function would you use to combine two or more result sets into one?

What is UNION?

M
e
n
u