Skip to main contentSkip to solution

The task is to display all the details of customers of Delhi (contained in table CUSTOMER) who made a purchase of more than 10,000. Which of the following query will be used for the above operation on table CUSTOMER?

Solution

✅ Correct Option: 1

"All the details" means every column, so the query must use SELECT *. Both conditions must hold together, so they are joined with AND: purchase > 10000 for more than 10,000 and city = 'Delhi' for Delhi customers. Option 1 is the only query that does both.

In real SQL, write the number without a comma (10000), since the comma would cause a syntax error.


Options 2 and 4: they use < and <=, which select purchases of 10,000 or less, not more.

Option 3: it selects only the purchase column, not all details, and | is not a valid logical operator in this query.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question