Business Studies, asked by vamsi1g, 6 days ago

8. Write a query to display details (customer id,customer fullname,order id,product
quantity) of customers who bought more than ten (i.e. total order qty) products per shipped order.

Answers

Answered by kiranmaharana2020
15

Answer:

do follow

and drop some thanks

ok

Answered by brainlysme13
0

The required query is as follows:

select T1.customer_name, T1.customer_ID, T2.number_of_products_ordered

from customer_table T1

inner join

(

   select cust.customer_ID as customer_identity, count(distinct ord.product_ID) as number_of_products_ordered

   from customer_table cust

   inner join order_table ord on cust.customer_ID=ord.customer_ID

   group by ord.customer_ID, ord.product_ID

   having count(distinct ord.product_ID) > 10

) T2

on T1.customer_ID=T2.customer_identity

order by T2.number_of_products_ordered, T1.customer_name

#SPJ3

Similar questions