-> values(1204,'Tracker','Sports',9,843.00,Null,860); Query OK, 1 row affected (0.09 sec) 1) Find the highest cost of any shoe of type School. mysql> select max(cost) "Highest cost" -> from shoes -> where type='School';
2) To find the Highest Selling Price of any type of shoe.
mysql> Select max(cost) "Highest Cost" -> from shoes; 3) To find the lowest cost of any shoe of type School. mysql> Select min(cost) "Lowest cost" -> from shoes -> where type="School";
5) To find the average quantity in stock for the shoes of type Sports. mysql> Select avg(Qty) "Average Quantity" -> from shoes -> where type="Sports";
6) To find the total quantity(Cost x Quantity) of shoes of type Office present
in the inventory. mysql> Select qty*cost as Value -> from shoes -> where type="Office"; 7) To count the different types of shoes that the factory produces mysql> Select Type, count(*) as Total from shoes -> group by type;
8) To count the number of orders of qtty more than 300.
mysql> Select Type, Name, Qty -> from shoes, orders -> where Code=Shoes_code and qtty>300;
9) Find the total qty of shoes of various types.
mysql> Select type,sum(Qty) "Total Qty" -> from shoes -> group by type; 10) To find the max, min and avg margin of each type of shoes. mysql> Select type,max(Margun) "Max Margin",min(Margun) "Min Margin",avg(Margun) "Avg Margin" -> from shoes -> group by type;