What are the average amount purchased and value purchased for the supplier who supplies the most products
select avg ( total_amount_purchased ), avg ( total_value_purchased ) from product_suppliers where supplier_id = ( select supplier_id from product_suppliers group by supplier_id order by count ( * ) desc limit 1 )
I want the average amount purchased and value purchased for the supplier who supplies the least products
select avg ( total_amount_purchased ), avg ( total_value_purchased ) from product_suppliers where supplier_id = ( select supplier_id from product_suppliers group by supplier_id order by count ( * ) limit 1 )
What is the supplier id who supplies the least products?
select distinct supplier_id from product_suppliers where supplier_id = ( select supplier_id from product_suppliers group by supplier_id order by count ( * ) limit 1 )
What is the total value purchased for supplier id 3
select sum ( total_value_purchased ) from product_suppliers where supplier_id = 3
What is the "date supplied to" of supplier id 3?
select date_supplied_to from product_suppliers where supplier_id = 3