SQL Assignment Use the W3School\'s sample database (ink here) to answer the ques
ID: 3914643 • Letter: S
Question
SQL Assignment Use the W3School's sample database (ink here) to answer the questions in the following pages. This quiz does not have automatic grading, so you will not receive immediate feedback about your answers. I have to grade your answers manually after the closing date. Each query will be graded based on the following rubric: · 096: The SQL system return error an error with no results after submitting the query " 1096: The SQL query can be run, but the answer to the question is not clear from the results 20%-80%; The SQL query can be run, the answer to the question is part of the results or can be Inferred from the results. 100%: The SQL query produces the exact requested results. , 18Explanation / Answer
1. Select suppliername from suppliers where city='Tokyo';
2. Select productname,price from products join categories on products.categoryid=categories.categoryid where categories.categoryid=7 order by price desc limit 3;
3. Select count(orderid) from orders where orderdate between '1996-12-01' and '1996-21-31;
If the year was 1997, then use 1997 instead of 1996. In the output given 1996 was used .
4. Select categories.categoryid as categoryid, avg(products.price) as categoryaverageprice from products join categories on products.categoryid=categories.categoryid group by categories.categoryid order by avg(products.price) desc;
5. Select categories.categoryname as categoryname,avg(products.price) as categoryaverageprice from products join categories on products.categoryid=categories.categoryid group by categories.categoryname order by avg(products.price) desc;
6. Select productname, unit*price as revenue from products order by unit*price desc limit 5;
7. Select categories.categoryname,sum(products.unit*price) as revenue from products join categories on products.categoryid= categories.categoryid group by categories.categoryname;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.