0
0
SQLquery~10 mins

Why databases over files 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 records from the users table.

SQL
SELECT [1] FROM users;
Drag options to blanks, or click blank then click option'
AALL
BALL_COLUMNS
CEVERY
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using ALL or EVERY instead of * to select all columns.
2fill in blank
medium

Complete the code to find records where age is greater than 30.

SQL
SELECT * FROM employees WHERE age [1] 30;
Drag options to blanks, or click blank then click option'
A>
B=
C<
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' or '=' instead of '>' for greater than comparison.
3fill in blank
hard

Fix the error in the SQL query to count the number of orders.

SQL
SELECT COUNT([1]) FROM orders;
Drag options to blanks, or click blank then click option'
A*
Border_id
Call
Dorders
Attempts:
3 left
💡 Hint
Common Mistakes
Using COUNT(orders) or COUNT(all) which are invalid.
4fill in blank
hard

Fill both blanks to select names and ages of employees older than 25.

SQL
SELECT [1], [2] FROM employees WHERE age > 25;
Drag options to blanks, or click blank then click option'
Aname
Bage
Csalary
Ddepartment
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting salary or department instead of name and age.
5fill in blank
hard

Fill all three blanks to create a dictionary of product names and prices where price is above 100.

SQL
SELECT [1], [2] FROM products WHERE [3] > 100;
Drag options to blanks, or click blank then click option'
Aproduct_name
Bprice
Dquantity
Attempts:
3 left
💡 Hint
Common Mistakes
Using quantity instead of price in the WHERE clause.