What to use for data analysis programming, SQL, Python, or esProc SPL?

01 - User Session Count

User behavior data table

useridaction_typeaction_time
U1059login2023-12-01 18:00:10
U1092login2023-12-01 18:00:17
U1069login2023-12-01 18:00:22

A session is considered over if a user does not take any action within 10 minutes, or if they do not log in within 5 minutes after logging out. Calculate the number of sessions for each user.

Copy Code:https://c.scudata.com/article/1729475229196#toc_h3_1


02 - Count the players who score 3 times in a row within 1 minute

Score table of a ball game

teamplayerplay_timescore
AA32023-12-31 09:00:092
BB12023-12-31 09:00:243
AA52023-12-31 09:00:572

Copy Code:https://c.scudata.com/article/1729475229196#toc_h3_5


03 - Calculate the number of users who are active for three consecutive days within every 7 days

User login data table

iduseridts
14662017-01-07 18:24:55
24582017-01-07 18:25:18
34582017-01-07 18:26:21

Copy code: https://c.scudata.com/article/1729475229196#toc_h3_9


04 - Calculate the next-day retention rate of new users per day

User login data table

iduseridts
14662017-01-07 18:24:55
24582017-01-07 18:25:18
34582017-01-07 18:26:21

Copy code: https://c.scudata.com/article/1729475229196#toc_h3_13


05 - Calculate the increase of stock price on the day when it is higher than those on the previous and next 5 days

Stock price data table

STOCKIDDATECLOSING
622015-01-058.91
622015-01-068.31
622015-01-077.6

Copy code: https://c.scudata.com/article/1729475229196#toc_h3_17

Response (1)

Leave a Reply

Discover more from esProc SPL Official Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading