IMC461 SQL Quiz
- Due Feb 4, 2025 at 11:59pm
- Points 100
- Questions 6
- Available after Feb 4, 2025 at 3pm
- Time Limit 60 Minutes
Instructions
In this midterm exam, there are four (4) questions and one extra credit problem. The first three questions are worth 30 points each. Q4 and the extra credit problem are each worth 10 points. Points for the extra credit problem will be added after the quiz is reviewed.
This is an individual assignment. You may refer to your notes, but do not access the internet, any form of generative AI, or share, text, or in anyway discuss the quiz with others. I'm happy to answer any clarifying questions.
The quiz will utilize two data files. You have already worked with them in class, but here are the links them in case you need to download them:
Load these files into R, and using SQL syntax and the sqldf package answer the following questions.
order_fact <- read.csv("Order_Fact.csv", header=TRUE)
prod_dim <- read.csv("product_dim.csv", header=TRUE)
Notes on the data:
- Order_Fact table: Total_Retail_Price column contains the line total sales amount. All discounts are already incorporated into this column.
- Order_Fact table: CostPrice_per_Unit column contains the product cost for each individual unit
Each problem will ask you to submit a specific numeric answer. Please provide your R/SQLDF code in the text box at the end and I will assign partial credit for incorrect answer based on your code. There will be no partial credit on the Extra Credit question.
You have 1 hour to complete the quiz once you start. Please let me know if you have any questions.