Advanced
sql
database
Write an SQL query
Query data correctly. Tuned for DeepSeek.
Prompt
Write an SQL query for [DATABASE] that [GOAL]. Tables: [SCHEMA]. Explain the query and suggest an index. Think step by step before giving the final answer.
Replace the [HIGHLIGHTED] parts with your own details.
Example output
A query with joins, grouping and an index tip.
Tips
- Give table and column names exactly.
