# Use Copilot for SQL query generation

Category: GitHub Copilot

# Use Copilot for SQL query generation

Describe a database query in English and get the SQL

Write a comment like `-- Get the top 5 users by total order value in the last 30 days` and Copilot will generate the SQL. Works best when your schema is visible in the same file or an open tab.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.