Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to select all columns from the feedback table.
No-Code
SELECT [1] FROM feedback; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'all' or 'columns' instead of *
Leaving the SELECT statement incomplete
✗ Incorrect
The asterisk (*) selects all columns from the table.
2fill in blank
mediumComplete the code to insert a new feedback entry with user_id and comment.
No-Code
INSERT INTO feedback (user_id, comment) VALUES ([1], 'Great app!');
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around string values
Using double quotes instead of single quotes
✗ Incorrect
String values must be enclosed in single quotes in SQL.
3fill in blank
hardFix the error in the query to get feedback comments where rating is 5.
No-Code
SELECT comment FROM feedback WHERE rating [1] 5;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' or '===' instead of '='
Using words like 'equals' instead of operators
✗ Incorrect
In SQL, the equality operator is a single equals sign (=).
4fill in blank
hardFill both blanks to update the comment for a specific feedback id.
No-Code
UPDATE feedback SET comment = [1] WHERE id [2] 10;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the string value
Using wrong operators like '>' or '!=' in WHERE clause
✗ Incorrect
The comment must be a string in quotes, and the WHERE clause uses '=' to match the id.
5fill in blank
hardFill all three blanks to create a table for user feedback with id, user_id, and comment.
No-Code
CREATE TABLE feedback (id [1] PRIMARY KEY, user_id [2] NOT NULL, comment [3]);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using BOOLEAN for text fields
Not specifying data types correctly
✗ Incorrect
id is an INTEGER primary key, user_id is a VARCHAR string, and comment is TEXT for longer feedback.