Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
1. Basic SQL Queries
This section
Practice test
12 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
5 cards from this lesson. Good the night before a test.
Try these first
- 1.
Write a SELECT statement to get the names of all employees.
Hint
Think about which columns you need from the employees table.
- 2.
Use a WHERE clause to find orders with a status of 'Completed'.
Hint
Use the STATUS you see in the orders table.
- 3.
What does the SELECT statement do?
- It deletes records from a table.
- It retrieves data from one or more tables.
- It modifies data in a table.
Hint
Think about what SELECT allows you to do with data.
- 4.
True or False: The LIMIT clause can be used to specify the maximum number of records returned.
- True
- False
Hint
Recall the purpose of LIMIT.
- 5.
Write a complex query using JOIN, COUNT, and GROUP BY to identify the total number of orders each customer has made and sort them in descending order.
Hint
Start by figuring out how customers relate to orders.
- 6.
Consider a dataset with users and their activity logs. Write a query to find which users have more than 10 logins in the last month.
Hint
You’ll need to filter by date and aggregate logins.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
2 more questions available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting