Test your SQL skills with quizzes, workouts, and classes

SQL is the definitive data access language. Whether you're a developer, DBA, data scientist or analyst, knowing SQL will be an asset throughout your career.

We've built Oracle Dev Gym to train you from zero to hero. Take our free courses to teach you the basics of SQL, targeted workouts to drill you on specific topics, and weekly quizzes to top up your skills and compete with others.

You need an Oracle Account to join Oracle Dev Gym. Click here to sign up.

Take free SQL quizzes online

Testing yourself is one of the few ways proven to help you learn faster. With hundreds of multiple choice SQL quizzes to choose from, Oracle Dev Gym is the ideal place to train and enhance your SQL knowledge.

The best way to improve is with a daily routine. To help you with this, we've built the daily quizzer. This sends a link to a new quiz straight to your inbox every weekday.

Here's a sample SQL quiz

Sample quiz (assume Oracle Database 11g Release 2 or higher)

You execute these commands:

 create table qz_bricks (
  brick_id integer
   not null
   primary key,
  colour varchar2(10)
   not null,
  shape varchar2(10)
   not null
 );

 insert into qz_bricks
  values ( 1, 'red', 'cylinder' );
 insert into qz_bricks
  values ( 2, 'red', 'cube' );
 insert into qz_bricks
  values ( 3, 'blue', 'cylinder' );
 insert into qz_bricks
  values ( 4, 'blue', 'cube' );
 insert into qz_bricks
  values ( 5, 'green', 'cylinder' );
 insert into qz_bricks
  values ( 6, 'green', 'cube' );

 commit;

Which choices return one row per colour, so the query returns these rows?

 COLOUR
 ----------
 blue
 green
 red

Choices - Select all that apply.

Choice 1

 select colour
 from  qz_bricks
 order by colour;

Choice 2

 select distinct colour
 from  qz_bricks
 order by colour;

Choice 3

 select unique colour
 from  qz_bricks
 order by colour;

Choice 4

 select colour
 from  qz_bricks
 group by colour
 order by colour;

Choice 5

 select max ( colour ) colour
 from  qz_bricks
 group by shape
 order by colour;

No Choice Correct (Collapsible)

No choice is correct.

Guess the SQL statement

For a lightweight way to test your syntax knowledge, play SQuizL. You're shown one or two parts of a SQL statement. You need to figure out which of the fragments below complete it.

In this SQuizL, line 4 is "fname = 'Al'" and line seven is "AND email is NULL". Use the options below it to complete the statement

You may be able to make many valid SQL statements given the options shown. Only one of these is correct! You have six tries to guess which.

Every day there is a new statement for you to guess. You can play anonymously or log in to your Dev Gym account to save your stats across devices.

Practice your SQL skills using workouts

To help you enhance your SQL muscles, we've built targeted SQL workouts. These training sessions have a series of quizzes focussed on a specific aspect of the language. This helps you get to grips with the details of each feature.

Our top workouts

PIVOT and UNPIVOT Operators

Get to grips with converting rows to columns and back again
Intermediate to Advanced
6 exercises
40 min

An Oracle JSON workout

Practice working with JSON in Oracle Database
Intermediate to Advanced
7 exercises
12 min

Oracle Database 21c SQL Quizzes

Discover new SQL & PL/SQL features in 21c
Intermediate to Advanced
9 exercises
10 min

Learn SQL with free courses

Oracle Dev Gym includes guided programs to help you learn SQL. These free, browser-based SQL classes include:

  • Videos to teach you the concepts
  • Live SQL tutorials for you to try writing real SQL
  • A series of quizzes to test your understanding

All courses include a free certificate of completion.

Our top SQL courses

Databases for Developers: Foundations

Learn how to create tables, write SQL queries, and change data in this beginner class
 
10 modules
70,000+ students

Databases for Developers: Next Level

Improve your SQL skills by learning how to get running totals, convert rows to columns, and make hierarchical queries.
 
12 modules
19,000+ students

Databases for Developers: Performance

Learn how to tune SQL by getting plans, create indexes, and optimize writes
 
10 modules
10,000+ students

Start training now!

Whether you're starting from scratch or looking to top up your skills, Oracle Dev Gym is the perfect place to train your SQL muscles. Sign up for your free account and get started!