0
0
SQLquery~10 mins

Why dialect awareness matters in SQL - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select all columns from the table named 'employees'.

SQL
SELECT [1] FROM employees;
Drag options to blanks, or click blank then click option'
A*
BALL
CCOLUMNS
DEVERY
Attempts:
3 left
💡 Hint
Common Mistakes
Using keywords like ALL or EVERY which are not valid for selecting all columns.
Writing the word COLUMNS which is not recognized in this context.
2fill in blank
medium

Complete the code to limit the number of rows returned to 5 in a MySQL query.

SQL
SELECT * FROM products [1] 5;
Drag options to blanks, or click blank then click option'
AROWNUM
BTOP
CFETCH
DLIMIT
Attempts:
3 left
💡 Hint
Common Mistakes
Using TOP which is used in SQL Server, not MySQL.
Using FETCH or ROWNUM which belong to other SQL dialects.
3fill in blank
hard

Fix the error in the SQL Server query to select the top 3 rows from the 'orders' table.

SQL
SELECT [1] 3 * FROM orders;
Drag options to blanks, or click blank then click option'
ALIMIT
BROWNUM
CTOP
DFETCH
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT which causes syntax error in SQL Server.
Using FETCH or ROWNUM which are not valid here.
4fill in blank
hard

Fill both blanks to write a PostgreSQL query that fetches 10 rows starting from the 5th row.

SQL
SELECT * FROM sales [1] 10 [2] 5;
Drag options to blanks, or click blank then click option'
ALIMIT
BOFFSET
CTOP
DFETCH
Attempts:
3 left
💡 Hint
Common Mistakes
Using TOP which is not supported in PostgreSQL.
Mixing FETCH with OFFSET incorrectly.
5fill in blank
hard

Fill all three blanks to write an Oracle SQL query that fetches 5 rows after skipping the first 10 rows.

SQL
SELECT * FROM employees [2] 10 ROWS [1] [3] 5 ROWS ONLY;
Drag options to blanks, or click blank then click option'
AFETCH
BOFFSET
CFIRST
DNEXT
Attempts:
3 left
💡 Hint
Common Mistakes
Using LIMIT which is not valid in Oracle.
Swapping FIRST and NEXT keywords.