← 返回 anthropic 的题目列表Basic SQL Exercise + Learning/Skill-Growth Discussion
类型:online_judge
Part A: SQL (basic)
Given a table events with:
user_id (string)
event_time (timestamp)
event_type (string)
value (numeric)
Write SQL for (implement 1–2 as requested):
Daily active users (DAU) by day.
P95 of value per event_type (if P95 isn’t supported, explain an alternative).
Each user’s first event time and the corresponding event type.
Part B: Learning / skill growth
Describe a time you had to ramp up on a critical skill quickly (SQL/cloud/data engineering/optimization). How did you plan, validate proficiency, and turn it into impact?
Constraints
State your timezone/day-bucketing assumptions.
Explain how you handle duplicates or late events.
Example
Input
events
user_id,event_time,event_type,value
u1,2025-01-01 01:00:00,click,1
u1,2025-01-01 02:00:00,view,3
u2,2025-01-01 03:00:00,click,2
u2,2025-01-02 01:00:00,view,5
Output
DAU:
2025-01-01 -> 2
2025-01-02 -> 1
(first event per user: u1=2025-01-01 01:00:00 click; u2=2025-01-01 03:00:00 click)