← Prompt Library / Engineering
Turn a plain-English data question into a working SQL query — with the assumptions stated, a readable structure, and the index note that keeps it fast.
Write a SQL query to answer: "{{question}}".
Schema:
{{schema}}
Return: the query with a comment per clause explaining its role, the assumptions you made about my schema or data (stated so I can correct them), the dialect notes if syntax varies ({{dialect}}), one common trap for this query shape (NULL-eating joins, timezone drift on date grouping, accidental fan-out), and the index that would make it fast if the tables are large. Prefer readable CTEs over nested subqueries.
Fields like {{ this }} are placeholders — replace them with your own details, or let Aria ask you for them.
This prompt runs with Aria connected to your email, files, CRM and 40+ other services — and you can schedule it to run automatically.
Start Free WeekReview a diff for correctness, security, and readability issues.
Get a plain-English walkthrough of unfamiliar code.
Generate thorough unit tests for a function.
Diagnose an error systematically: likely causes ranked with reasoning, the cheapest test for each, a...
Build a regular expression from a plain-English requirement — explained token by token, tested again...
Write a clean conventional commit message from a diff.