For the questions below, use the W3Schools customer orders database. You need to
ID: 3810707 • Letter: F
Question
For the questions below, use the W3Schools customer orders database. You need to submit thoroughly tested SQL statements. For your convenience and reference, relevant data model is attached as a PDF document with the assignment in the Blackboard. Name of this document is "RelationshipDiagramW3schoolsOrder.pdf" List the country wise customer count. Your query should show name of the country and number of customers in that country. List all the names of the products supplied by suppliers located in Japan. List the number of products in each category. Your query should display the name of category and number products in that category. List Order ID, Order Date for all the orders from year 1996. W3SCHOOLS SQL is located at http://www.w3schools.com/sql/default.asp (Preferred browser is Chrome). On this page, you will find a button called "Try it yourself'. Click on that button. You will be redirected to a page where you see a list of tables on the right side of the page. It is highly recommended to click 'Restore Database' button on this page during every session. The page contains a box where you can type in an SQL statement involving the listed tables. You type in your SQL statement in that box and click on "Run SQL" button. The results will be displayed if your SQL statement is syntactically correct.Explanation / Answer
1.SQL Query to List the country wise customer count:-
SELECT COUNT(CustomerId), Country
FROM Customers
GROUP BY Country;
3.SQL Query to List the number of products in each category:-
SELECT COUNT(ProductId), ProductName
FROM Products
GROUP BY ProductName;
4.SQL Query to List Order ID, Order Date for all the orders from year 1996:-
SELECT OrderId,OrderDate
FROM Orders
WHERE OrderDate >= 1/01/1996;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.