Bird
0
0

How would you write a WHERE clause to select products with a price between 50 and 100 inclusive?

hard🚀 Application Q9 of 15
C Sharp (C#) - LINQ Fundamentals

How would you write a WHERE clause to select products with a price between 50 and 100 inclusive?

AWHERE Price BETWEEN 50 AND 100
BWHERE Price >= 50 OR Price <= 100
CWHERE Price > 50 OR Price < 100
DWHERE Price = 50 AND Price = 100"
Step-by-Step Solution
Solution:
  1. Step 1: Understand range filtering in SQL

    To filter values between two numbers inclusive, BETWEEN ... AND ... is the concise syntax.
  2. Step 2: Evaluate options

    WHERE Price BETWEEN 50 AND 100 uses BETWEEN correctly; WHERE Price >= 50 OR Price <= 100 selects all rows; WHERE Price > 50 OR Price < 100 selects most rows; WHERE Price = 50 AND Price = 100 is impossible.
  3. Final Answer:

    WHERE Price BETWEEN 50 AND 100 -> Option A
  4. Quick Check:

    BETWEEN includes both ends [OK]
Quick Trick: BETWEEN ... AND ... filters inclusive ranges [OK]
Common Mistakes:
MISTAKES
  • Using OR instead of AND
  • Using = for range
  • Not including boundaries

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes