Latest

6/recent/ticker-posts

Use the following Product table and write the SQL query to find the count , sum and average price.

Please feel free to suggest any edits.... 

Use the following Product table and write the SQL query to find the count , sum and average price.









create table product(
  productId int,
  productName varchar(255),
  supplierId int,
  categoryId int,
  unit varchar(255),
  price double
  );
insert into product values
  (1,"chais",1,1,"10boxes*20bags",18),
  (2,"chang",1,1,"24-12 oz bottles",19),
  (3,"aniseed syrap",1,2,"12-550ml bottles",10),
  (4,"chef anton's cajon seasoning",2,2,"48-6 oz jars",22),
  (5,"chef anton's gumbo mix",2,2,"36 boxes",21.35);
select COUNT(price), SUM(price), AVG(price) from product;





Post a Comment

0 Comments