Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Fill in the blanks to complete the SQL statement below. A table called sales tracks revenue by year and quarter. (Each row represents quarterly sales
Fill in the blanks to complete the SQL statement below. A table called "sales" tracks revenue by year and quarter. (Each row represents quarterly sales in a given year.) The statement should create a new column called "year_over_year" that includes the "quarterly_sales" from a year earlier. (As an example, quarter 4 sales in 2022 would be compared to quarter 4 sales in 2021 .) Within the statement, in addition to this new column, include the year, quarter, and quarterly sales columns. Sort the data by the year and quarter in ascending order. SELECT year, quarter, quarterly_sales, FROM (quarterly_sales, ___ OVER (ORDER BY year, quarter) AS sales; Fill in the blanks to complete the SQL statement below. A table called "tickets" tracks the number of tickets sold each day at a movie theater. (Each row represents a different day.) The statement should create a new column called "tickets_yesterday" that includes the "tickets_sold" from the previous day. Within this statement, in addition to this new column, include the date_id and tickets_sold. Sort the data by the date_id in ascending order
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started