Sunday, April 23, 2023

LetCode SQL Game Analysis Problem

 --Date 23-04-2023
--LetCode SQL Interview Series


--Que-1--Write an SQL query to report the first login date for each player.


--Que-2--Each row is a record of a player who logged in and played a number of games (possibly 0) before logging out 
on someday using some device. Write a SQL query that reports the device that is first logged in for each player

--Que-3--Write an SQL query that reports for each player and dates, how many games played so far by the player. 
--That is the total number of games played by the player until that date. Check the example for clarity.


Que-4:

--Write an SQL query that reports the fraction of players that logged in again on the day after the day they first logged in, rounded to 2 decimal places. In other words, you need to count the number of players that logged in for at least two consecutive days starting from their first login date, then divide that number by the total number of players.


Check out the solution:



No comments:

Post a Comment

"🚀 Delta Lake's Vectorized Delete: The Secret to 10x Faster Data Operations!"

"🚀 Delta Lake's Vectorized Delete: The Secret to 10x Faster Data Operations!" Big news for data engineers! Delta Lake 2.0+ in...