AllRounder.ai
Chapters in this course

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.

Enrol free

12.2.2. WHERE – Filter Results

  • This section

    Practice test

    11 questions on this section. Wrong answers show you what to read again.

    Sign up to take it
  • Whole chapter

    Revision test

    Mixed questions from across the chapter. Your answers get marked.

    Sign up to take it
  • Quick

    Flashcard drill

    2 cards from this lesson. Good the night before a test.

Try these first

  1. 1.

    Write a SQL query to fetch all orders with status 'completed'.

    Hint

    Use 'completed' as your condition in the WHERE clause.

  2. 2.

    How can you retrieve users who registered after January 1, 2022?

    Hint

    Think about comparing the registration date.

  3. 3.

    What SQL clause is used to filter records based on conditions?

    • JOIN
    • WHERE
    • SELECT
    Hint

    Remember the keyword that starts with 'W' for filtering.

  4. 4.

    True or False: The WHERE clause can be used to select only specific columns.

    • True
    • False
    Hint

    Think about what the SELECT statement does.

  5. 5.

    Write a complex query to find users who registered in 2021 and have made more than 3 orders.

    Hint

    Combine filtering dates and subquery for order counts.

  6. 6.

    Construct a query that finds all products with a name containing 'wire' and a price above 30.

    Hint

    Use the LIKE operator for pattern matching.

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 free

Quiz

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

1 more question available

Enrol free

Challenge 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