Free SQL Practice

Practice SQL with Real Business Scenarios

Hands-on SQL exercises drawn from Banking, Retail, ERP, and Telecom data models — JOINs, window functions, aggregates, subqueries, and more.

Topics Covered

SQL JOINsWindow FunctionsGROUP BY & AggregatesSubqueriesCTEsCASE WHENHAVINGDate FunctionsNULL HandlingSelf Joins

Sample SQL Questions

1IntermediateBankingSELECT and WHERE ClausesAggregate Functions (COUNT, SUM, AVG, MAX, MIN)

How many customers have opened an account in the last month?

2IntermediateBankingSELECT and WHERE ClausesAggregate Functions (COUNT, SUM, AVG, MAX, MIN)

What is the total balance of all accounts in the bank?

3IntermediateBankingGROUP BY and HAVINGSelf-Joins

What is the total balance for each customer in the bank?

4IntermediateBankingGROUP BY and HAVINGSelf-Joins

How many accounts does each customer have, but only include customers with more than 2 accounts?

5IntermediateBankingSELECT and WHERE ClausesGROUP BY and HAVING

How many customers have a balance greater than $10,000?

6IntermediateBankingSELECT and WHERE ClausesGROUP BY and HAVING

List the total number of accounts for each customer with a balance over $5,000.

7IntermediateBankingSELECT and WHERE ClausesAggregate Functions (COUNT, SUM, AVG, MAX, MIN)

How many customers have a balance greater than $10,000?

8IntermediateBankingSELECT and WHERE ClausesAggregate Functions (COUNT, SUM, AVG, MAX, MIN)

What is the average account balance of all customers?

9IntermediateBankingAggregate Functions (COUNT, SUM, AVG, MAX, MIN)GROUP BY and HAVING

How many customers have accounts in the bank?

10IntermediateBankingAggregate Functions (COUNT, SUM, AVG, MAX, MIN)GROUP BY and HAVING

What is the average account balance for all accounts?

Ready to sharpen your SQL skills?

Get assigned practice sets, run queries live, receive AI-powered hints, and track your scores.

Sign in to start →