Free online SQL quizzes on Oracle Dev Gym

September 12, 2023 | 7 minute read
Chris Saxon
Developer Advocate
Text Size 100%:

Are you looking for free SQL questions to test your skills? Head to Oracle Dev Gym for all your quizzing needs.

Guess the SQL statement

SQuizL is a Wordle-style guess the SQL statement quiz. Each day there's a new statement for you to figure out. This appears in the top left of the screen, shown with zero, one or two parts of it filled in. Pick from the 24 SQL fragments below to complete the statement.

SQuizL quiz showing a partial SQL statement with options to complete it

In this SQuizL, the fragments "fname = 'Al'" and "AND email is NULL" are the initial clues. The fragments listed in grey below are possible options to complete it.

While you may be able to combine the fragments to make many valid statements, there is only one correct solution per quiz. Analyse the code and options below it to determine it.

Click which options you think complete the code and hit the Submit button to enter your guess:

Completed SQuizL SQL statement ready to submit

This will reveal which of your choices are correct. These are highlighted to show whether they're in the solution:

  • SQL = A correct choice in the right place
  • SQL = A correct choice in the wrong location
  • SQL = An incorrect choice

Your guesses are shown at the bottom of the screen:

SQuizL guess history

The screenshot above shows you've had four guesses so far. You've determined that the first clue is UPDATE and the fifth is WHERE. You've also found that "subscribers s", "SET", and "id < 10" are all in the SQL statement.

Can you guess what the complete statement is from here?

You get six tries to complete the SQL statement. Figure it out and you’ll see a summary of your play history.

SQuizL post-quiz page with play history

On the top left you see the complete SQL statement. On the top right you can see a summary of how many attempts you took and how quickly you solved the quiz.

Click the "Share results" button to get a summary of your stats for today you can paste into your favourite social media app to brag about your results.

SQZL 07-SEP-23
3/6 guesses

Below your stats is a summary of how many attempts other players took to solve the SQuizL. Come back the next day to see how you compare:

Screenshot of SQzuiL results page showing summary of number of guesses all players needed to complete yesterday's SQuizL

By default, your results are stored locally. To keep your play history and share it across devices, create a Dev Gym account using your free Oracle Account.

Each day there will be new code for you to guess in six tries or less. Challenge your friends and colleagues. See who can figure it out in the fewest tries and get the longest streak of correct SQL statements.

SQuizL is a fun way to expand your SQL knowledge that fits in your coffee break. But what if you're looking for more in-depth questions on SQL, PL/SQL or other database topics?

Multiple choice database questions and answers

Oracle Dev Gym has thousands of free multiple choice database quizzes in its library. These cover SQL, PL/SQL, and database design.

These present you with a question and several choices. Each of these could be right or wrong. The goal is to select all the correct options in the shortest time.

Dev Gym quiz on not null constraints

Click the grey square next to the options you think are correct. Then hit the "Submit Answer" button at the bottom of the screen. For questions taken from the library you'll be presented with a page showing your results and how they compared to other players.

For each choice you're shown what you selected, whether this is right, and the percentage of other players who got this right:

Answers to Dev Gym not null constraint quiz

In the screenshot above:

  • For Choice 1:
    • The grey tick to the left of it means you selected it as a correct option
    • The green tick on the far right means you got this option right! So it was correct
  • For Choice 2:
    • The grey square to the left of it means you left it unselected as an incorrect option
    • The red square on the far right you got this option wrong; it was a correct choice for the question
  • For Choice 3:
    • The grey square to the left of it means you left it unselected as an incorrect option
    • The green tick on the far right means you got this option right! So it was incorrect

To help you navigate our quizzes and give a shared experience, every day at midnight UTC we schedule existing questions. There's one of these featured quizzes for each of these topics:

  • SQL
  • PL/SQL
  • Logic
  • Database design

Alongside these we also publish two brand new quizzes every Saturday at midnight UTC. One on Oracle Database and one on Logical thinking. These are for competitive play - the answers are hidden until the event closes the following Saturday.

Once a competitive quiz is closed, you can view your answers and we update the ranking leader boards. These show how your speed and correctness compared to other database enthusiasts. We summarize the scores for each week, month, quarter, year, and lifetime.

Each year we enter the top 50 highest scoring players from the previous year's competitive quizzes into the Dev Gym Championships. All players take a series of tough questions at the same time. The winner is whoever can get the most correct in the shortest time.

Answering quizzes is a good way to learn. But if you’re a complete beginner they can be overwhelming. To help you get started with Oracle Database we have free classes to guide you through the process.

Learn SQL for free

SQL is one of the most popular programming languages. Learning the basics of it will be an asset throughout your career.

Oracle Dev Gym has a series of free SQL courses to help you build your understanding of the language.

Databases for Developers: Foundations

Learn the basics of working with Oracle SQL. In this course you’ll learn how to:

  • Create and alter tables
  • Write queries to join tables and aggregate rows
  • Change data with insert, update, and delete

Register at

Databases for Developers: Next Level

Following on from Foundations, Next Level teaches you more advanced SQL skills, including:

  • The types of subquery available and how to use them
  • Convert rows-to-columns with PIVOT
  • The basics of using window functions to calculate running totals

Register at

Databases for Developers: Performance

If you’ve mastered the basics of writing SQL, the next step is to learn how to make SQL fast. This performance tuning course will teach you how to:

  • Read explain plans
  • Create indexes to make SQL faster
  • Understand the join methods nested loops, hash joins, and merge joins

Register at

Analytic SQL for Developers

A deeper dive into how analytic functions (aka window functions) work. This course will show you how to:

  • Use the OVER clause to make aggregate functions into analytic
  • Defining sliding windows over data
  • Solve problems with window functions

Register at

Each course includes videos to teach you the concepts, Live SQL tutorials for you to practice your skills, and quizzes to test your knowledge.

All courses include a free certificate of completion for you to share.

We hope you find the quizzes and classes on Dev Gym fun and informative. If you have any questions, comments or suggestions about these, please use the feedback form on the site available from the top-right menu. We look forward to hearing from you!

Chris Saxon

Developer Advocate

Chris Saxon is an Oracle Developer Advocate for SQL. His job is to help you get the best out of the Oracle Database and have fun with SQL!

To help you with this he blogs at All Things SQL. He also creates videos combining SQL and magic on YouTube at the The Magic of SQL.

If you have questions about working with Oracle Database technology, please reach out to him. You can do this via Twitter or on Ask Tom.

Previous Post

How to modify constraints in Oracle Database

Chris Saxon | 10 min read

Next Post

How to calculate the longest and current consecutive streaks with Oracle SQL - #JoelKallmanDay

Chris Saxon | 4 min read