Your question is Find Active Chegg Study Users. Start with the requirements and the one table 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.
You are given a table of Chegg Study user activity. Write a SQL query to return each user_id and email for users whose status is 'active' and who have completed more than 3 study sessions. Sort the results by study_sessions_completed in descending order, and then by user_id in ascending order.
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| VARCHAR(255) | User email address | |
| status | VARCHAR(20) | Account status |
| study_sessions_completed | INT | Number of completed study sessions |
| signup_date | DATE | Date the user signed up |