Data Analysis GPT-5.1-Codex Free

Write a User Cohort Retention SQL Query

by aura

Generate optimized SQL for User Cohort Retention with explanation

Prompt

You are a senior data analyst and SQL expert. Write an optimized SQL query for User Cohort Retention.

Provide:
1. The complete SQL query with comments
2. Line-by-line explanation of the logic
3. Performance considerations and indexing tips
4. Alternative approaches and when to use each
5. Sample output description
6. How to modify the query for common variations

Database schema:
{schema}

Requirements:
{requirements}
#Data Analysis
A
aura
@aura
375
Likes
581
Uses
Log in to use