Write a SQL query to display all products where there is an order containing exactly two units
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a SQL query to display all products where there is an order containing exactly two units of the product for each of the products.
In database_1 there is the following:
Orders(order_id(Primary, int), registered_date(date), user_id(MUL, int)
OrdersProducts(order_id(Primary, int), price(float), product_id(Primary, int), quantity(int)
Ratings(order_id(Primary, int), product_id(Primary, int), rate(int), comment(VARCHAR)
Users(email(UNIQUE, VARCHAR), name(VARCHAR), password(VARCHAR), registered_date(date), username(UNIQUE, VARCHAR), user_id(Primary, int)
Related Book For
Accounting Information Systems
ISBN: 9780132871938
11th Edition
Authors: George H. Bodnar, William S. Hopwood
Posted Date: