Your question is Top Users by Category. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
HackerRank Product Analytics wants to compare user activity across challenge categories. Write a PostgreSQL query that identifies the top three users by accepted submission count in the SQL and Algorithms categories during January 2025.
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique HackerRank user identifier |
| username | VARCHAR(50) | HackerRank username |
| VARCHAR(120) | User email address |
| Column | Type | Description |
|---|---|---|
| submission_idPK | INT | Unique submission identifier |
| user_id | INT | User who made the submission |
| challenge_id | INT | Challenge associated with the submission |
| status | VARCHAR(20) | Submission result, such as accepted or rejected |
| submitted_at | TIMESTAMP | Time the submission was created |
| Column | Type | Description |
|---|---|---|
| challenge_idPK | INT | Unique challenge identifier |
| title | VARCHAR(100) | Challenge title |
| category | VARCHAR(50) | Challenge category |