Question: 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
Get step-by-step solutions from verified subject matter experts
