0
0
MySQLquery~10 mins

MySQL vs PostgreSQL vs SQLite - Interactive Practice

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 a table named 'users'.

MySQL
SELECT [1] FROM users;
Drag options to blanks, or click blank then click option'
A*
Ball
Ceverything
Dcolumns
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'all' or 'columns' instead of '*'
Leaving the blank empty
2fill in blank
medium

Complete the code to create a table named 'products' with an integer 'id' column as primary key.

MySQL
CREATE TABLE products (id [1] PRIMARY KEY);
Drag options to blanks, or click blank then click option'
ATEXT
BFLOAT
CVARCHAR(255)
DINT
Attempts:
3 left
💡 Hint
Common Mistakes
Using text types like TEXT or VARCHAR for numeric IDs
Using FLOAT which allows decimals
3fill in blank
hard

Fix the error in the query to get the count of rows in 'orders'.

MySQL
SELECT COUNT([1]) FROM orders;
Drag options to blanks, or click blank then click option'
Aorder_id
B*
Call
Drows
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'all' or 'rows' which cause errors
Using a specific column name which may miss NULL values
4fill in blank
hard

Fill both blanks to select the name and price from 'items' where price is greater than 100.

MySQL
SELECT [1], price FROM items WHERE price [2] 100;
Drag options to blanks, or click blank then click option'
Aname
B<
C>
Ditem_name
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' for price comparison
Using wrong column names
5fill in blank
hard

Fill all three blanks to insert a new user with id 5, name 'Alice', and email 'alice@example.com' into 'users'.

MySQL
INSERT INTO users ([1], [2], [3]) VALUES (5, 'Alice', 'alice@example.com');
Drag options to blanks, or click blank then click option'
Aid
Bname
Cemail
Dusername
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong column names like 'username' instead of 'name'
Mismatching columns and values order