0
0
HLDsystem_design~10 mins

When to use SQL vs NoSQL in HLD - 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'.

HLD
SELECT [1] FROM users;
Drag options to blanks, or click blank then click option'
A*
BALL
CCOLUMNS
DEVERYTHING
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like ALL or COLUMNS instead of *
2fill in blank
medium

Complete the code to insert a new record into the 'products' table with columns 'name' and 'price'.

HLD
INSERT INTO products (name, price) VALUES ([1]);
Drag options to blanks, or click blank then click option'
A'Book'
B'Book', 12.99
C12.99
D'Book', '12.99'
Attempts:
3 left
💡 Hint
Common Mistakes
Providing only one value or quoting numbers incorrectly
3fill in blank
hard

Fix the error in the SQL query to update the 'age' of a user with id 5.

HLD
UPDATE users SET age = [1] WHERE id = 5;
Drag options to blanks, or click blank then click option'
A30
Bage = 30
Cage + 1
D'30'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting numbers in quotes or using assignment syntax incorrectly
4fill in blank
hard

Fill both blanks to create a NoSQL document filter that finds users older than 25.

HLD
{ 'age': { [1]: [2] } }
Drag options to blanks, or click blank then click option'
A$gt
B25
C$lt
Dage
Attempts:
3 left
💡 Hint
Common Mistakes
Using $lt (less than) or wrong field names
5fill in blank
hard

Fill all three blanks to create a SQL query that selects users with age greater than 30 and orders by name ascending.

HLD
SELECT [1] FROM users WHERE age [2] 30 ORDER BY [3] ASC;
Drag options to blanks, or click blank then click option'
A*
B>
Cname
Dage
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong comparison operators or ordering by wrong column