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

1.2. Filtering with WHERE

  • 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

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

Try these first

  1. 1.

    What does the WHERE clause do in SQL?

    Hint

    Think about how it modifies the results of a query.

  2. 2.

    Write a SQL command to get all orders where order_status is 'Pending'.

    Hint

    Remember the format of a basic SQL query.

  3. 3.

    What does the WHERE clause do in a SQL query?

    • A. It indicates which table to query.
    • B. It filters records based on specified conditions.
    • C. It sorts the resulting records.
    Hint

    Think about what filtering means in data retrieval.

  4. 4.

    True or False: The WHERE clause can only use the '=' operator.

    • True
    • False
    Hint

    Consider the different ways we can compare values.

  5. 5.

    Create a SQL query that returns orders placed in 2023 that are either 'Pending' or 'Shipped' and have a total over $500.

    Hint

    Combine multiple conditions and consider using BETWEEN for date ranges.

  6. 6.

    How would you retrieve a list of users who registered last year and have logged in more than 5 times?

    Hint

    Combine date checks with a count condition.

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