You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- (player_id, event_date) is the primary key of this table.
13
+
-- This table shows the activity of players of some game.
14
+
-- Each row is a record of a player who logged in and played a number of games (possibly 0) before logging out on some day using some device.
15
+
16
+
17
+
-- We define the install date of a player to be the first login day of that player.
18
+
19
+
-- We also define day 1 retention of some date X to be the number of players whose install date is X and they logged back in on the day right after X, divided by the number of players whose install date is X, rounded to 2 decimal places.
20
+
21
+
-- Write an SQL query that reports for each install date, the number of players that installed the game on that day and the day 1 retention.
22
+
23
+
-- The query result format is in the following example:
-- period_start and period_end indicates the start and end date for sales period, both dates are inclusive.
26
+
-- The average_daily_sales column holds the average daily sales amount of the items for the period.
27
+
28
+
-- Write an SQL query to report the Total sales amount of each item for each year, with corresponding product name, product_id, product_name and report_year.
29
+
30
+
-- Dates of the sales years are between 2018 to 2020. Return the result table ordered by product_id and report_year.
31
+
32
+
-- The query result format is in the following example:
0 commit comments