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 quiz

SQuizL is a Wordle-style guess the SQL statement quiz. Each day there’s a new statement for you to figure out. This appears at the top left of the screen, shown with zero, one or two parts 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 an Oracle 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. Give yourself another minute and see if you can guess the missing keywords in a series of SQL statements.

Guess the missing SQL keyword quiz

Speed SQL is a race against the clock to find the missing keyword in a series of SQL statements. For each statement, one of the keywords will be replaced with question marks. Below it you’re presented with four possible keywords to complete the SQL.

Speed SQL example: Guess the missing keyword in this statement

In the example above, you need to figure out what goes in place of the question marks in this ALTER command:

ALTER ???? users ADD ( photo BLOB NOT NULL, email VARCHAR2 (255) NOT NULL )

Below it are four keywords to choose from:

  • TO_DATE
  • TABLE
  • TEMPORARY
  • STATEMENT_ID

Select which you think is correct and you’re shown if you were right or wrong. Then the next statement will load. Keep guessing which option you think is correct until you’ve tried them all or the time runs out.

Below the keywords, a series of ticks and crosses will appear to show whether you were right. You have sixty seconds to guess ten statements. Once you’ve made ten choices or a minute is up, you’ll be shown your results.

Speed SQL results

The results give a summary of your attempts for today’s quiz, along with a breakdown of your choices for your last go and your best result (the most correct in the shortest time). Click the share buttons to copy your best or last attempt to the clipboard.

Scroll down and you can see a chart of how many correct guesses everyone made in the previous day’s quiz.

You can play as many times as you want. Keep trying until you’ve found the keyword for every statement. Challenge your friends and colleagues to see who can get them all right the fastest.

A new set of SQL statements will be released every day at midnight UTC. Come back the next day to see a summary of how many correct guesses all players made.

Create a free Oracle account and register on Oracle Dev Gym and you can earn trophies for playing and solving Speed SQL every day in a week, month, quarter or year.

Creating a Dev Gym account also enables you to play more in-depth questions on SQL, PL/SQL and 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 compare 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 https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-foundations.html

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 https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-next-level.html

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 https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-performance.html

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 https://devgym.oracle.com/pls/apex/dg/class/analytic-sql-for-developers.html

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!

UPDATE 1 July 2025: Added section on Speed SQL

UPDATE 17 July 2025: Updated title from quizzes -> questions