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

01 - User Session Count
User behavior data table
| userid | action_type | action_time |
| U1059 | login | 2023-12-01 18:00:10 |
| U1092 | login | 2023-12-01 18:00:17 |
| U1069 | login | 2023-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
| team | player | play_time | score |
| A | A3 | 2023-12-31 09:00:09 | 2 |
| B | B1 | 2023-12-31 09:00:24 | 3 |
| A | A5 | 2023-12-31 09:00:57 | 2 |
| … | … | … | … |

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
| id | userid | ts |
| 1 | 466 | 2017-01-07 18:24:55 |
| 2 | 458 | 2017-01-07 18:25:18 |
| 3 | 458 | 2017-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
| id | userid | ts |
| 1 | 466 | 2017-01-07 18:24:55 |
| 2 | 458 | 2017-01-07 18:25:18 |
| 3 | 458 | 2017-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
| STOCKID | DATE | CLOSING |
| 62 | 2015-01-05 | 8.91 |
| 62 | 2015-01-06 | 8.31 |
| 62 | 2015-01-07 | 7.6 |
| … | … | … |

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








Response (1)