? Display wholesaler from 'Pune' city and supplying 'Monitor'
SQL>select w_name from wholesaler,product,w_prod where wholesaler.w_no=w_prod.w_no and product.p_no=w_prod.p_no and p_name=’Monitor’ and city=’pune’;
Display total number of wholesaler of each product.
SQL>select p_name,count(w_name) from wholesaler,product,w_prod where Wholeseler.w_no=w_prod.w_no and product.p_no=w_prod.p_no group bu p_name;
Display all wholesalers who are supplying ‘Keyboard’ with maximum price.
SQL>select max(rate),w_name from wholesaler,product,w_prod where
Wholesaler.w_no=w_prod.w_no and product.p_no=w_prod.p_no and p_name='keyboard' group by w_name;
Display total quantity of each product sold by ‘Mr. Khabia’.
SQL>select p_name,sum(quantity)from wholesaler,product ,w_prod where
wholesaler.w_no=w_prod.w_no and product.p_no=w_prod.p_no and w_name='Mr.Khabia'
group by p_name;
Decrement rate of all products by 5% supplied by wholesaler from 'Pune ' city
SQL>update wholesaler,product,w_prod SET where wholesaler.w_no=w_prod.w_no and
product.p_no=w_prod.p_no and rate=rate-0.05 and city='pune';