top of page

SQL Data Aggregation Sample Assignment

Updated: Oct 5, 2021

Need help with SQL Assignment Help or Project Help? At Codersarts we offer 1:1 session with expert, Code mentorship, Course Training, and on-going development projects. Get help from vetted Machine Learning engineers, mentors, experts and tutors.



Business Questions to Answer with SQL Views :


A) Create a view that shows the total count of products in each brand if the brand has less than 50 products. Show the brand id, brand name, and the count of products in the result.


B) Create a view that shows the total dollar amount sold in each category. Be sure to include category id and category name in the result set. Also, make sure any categories without sales are also included in the result set.


C) For each staff member, calculate the staff member’s average sale amount and show only the staff members and sale amounts that are greater than the average sale amount across all employees.


D) Create a view that shows every staff member and the number of sales orders attributable to him/her if they had greater than 25 orders and it was shipped in 2018.



SQL Data Aggregation Sample Assignment
SQL Data Aggregation Sample Assignment


Create Simple Queries to Answer the Following Questions

  • For each question, capture a screenshot of your code and the resulting execution of the code. These will not be views but simple queries.

E) Create a query that shows the total sales amount by month based on the order date. Your query result should match the result below.















F) A discount needs to be updated for any order that was shipped in 2017, included product 23, and was sold in Store #2. The new discount should be .10.


G) Create a new table called “ToBeRetired” that includes product_id, product_name, and model_year, and list_price. Populate this table with any products that were never purchased (ever) and are from the model year 2018.


H) Create a stored procedure that shows all of the stores and the total quantity of stock held in that store (across all products). Make the store’s state is a parameter that the user can enter when running the stored procedure.





Need more help in SQL Programming?



Tags:

Comments


bottom of page