On Instagram Reels, the growth team wants to understand posting consistency for active creators in the AARRR activation stage. Write a SQL query to find, for each user who posted at least 2 times in 2024, the number of days between their first and last post in 2024.
user_id, first_post_date, last_post_date, and days_between_posts.days_between_posts as the difference in days between the first and last 2024 post.days_between_posts descending, then user_id ascending.| Column | Type | Description |
|---|---|---|
| post_idPK | INT | Unique post identifier |
| user_id | INT | Instagram user identifier |
| post_surface | VARCHAR(50) | Surface where the post was created, such as reels or fb_groups |
| created_at | TIMESTAMP | Timestamp when the post was created |
| caption_text | TEXT | Optional post caption |