Question

Figure 3-4 Sample Schema co CO PRODUCTS CUSTOMERS product_id customer_id product_name email_address unit_price full_name prod

0 0
Add a comment Improve this question Transcribed image text
Answer #1

To my opinion query should be like:

"SELECT PRODUCTS.product_id,PRODUCTS.product_name,ORDER_ITEMS.quantity FROM PRODUCTS,ORDER_ITEMS,ORDERS WHERE ORDERS.order_datetime BETWEEN '2018-01-01' AND '2018-12-31' AND ORDERS.order_status='COMPLETED' ORDER BY ORDER_ITEMS.quantity DESC LIMIT 10 " ;

explanation:

here,datetime clause will select date from 1 jan 2018 till 31 dec 2108 .and order by will display the most value in desc order and limit will used to display only 10 limited rows metadata

Add a comment
Know the answer?
Add Answer to:
Figure 3-4 Sample Schema co CO PRODUCTS CUSTOMERS product_id customer_id product_name email_address unit_price full_name product_details product_image...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Table structure: administrators = admin_id, email_address, password, first_name, last_name categories = category_id, category_name customers = customer_id,...

    Table structure: administrators = admin_id, email_address, password, first_name, last_name categories = category_id, category_name customers = customer_id, email_address, password, first_name, last_name, shipping_address_id, billing_address_id order_items = item_id, order_id, product_id, item_price, discount_amount, quantity orders = order_id, customer_id, order_date, ship_amount, tax_amount, ship_date, ship_address_id, card_type, card_number, card_expires, billing_address_id products = product_id, category_id, product_code, product_name, description, list_price, discount_percent, date_added 5. Write a SELECT statement that uses regular expression functions to get the username and domain name parts of the email addresses in the Administrators table. Return...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT