📚 Practice Mode

SQL Programming Language

Learn at your own pace with hints and detailed explanations

1 / 15
Multiple Choice

Consider the following database table- Table Name- Items_Ordere

Customer_ID Order_date Item Quantity Price
77120 6-Jul-1999 Belt 1 140
77121 1-Jul-1999 Watch 4 1230
77122 30-Jun-1999 T-shirt 6 1020
77123 12-June-1999 Fan 1 950.50
77124 30-Aug-1999 Cooler 1 4010.20
77125 30-May-1999 Bag 7 2950
77126 1-Jun-1999 Shoes 2 1280
77122 12-Feb-1999 Jeans 2 2000
77124 1-Aug-2000 Jacket 1 1260

How will you find the number of orders made by each customer? Select the correct option.

  1. Select customer_id, sum(price) from items_ordered group by customer_id
  2. Select customer_id, count(customer_id), price from items_ordered group by customer_id
  3. Select customer_id, count(customer_id), count(price) from items_ordered group by customer_id
  4. Select customer_id, count(customer_id), count(price) from items_ordered group by item
  5. None of the above