Write SQL Queries Using Plain English
Forget the syntax. Learn how to query your database by simply asking questions in plain English.
SQL is powerful, but the syntax can be tricky. INNER JOIN, LEFT OUTER JOIN, GROUP BY, HAVING... it's easy to make a mistake.
What if you could just ask your database a question?
Text-to-SQL with Rephrase
Rephrase can translate your natural language questions into valid SQL queries.
Input: "Show me the top 5 customers who spent the most money in 2024."
Prompt: "Write a PostgreSQL query for this. Table names: users, orders."
Output:
SELECT u.name, SUM(o.amount) as total_spent
FROM users u
JOIN orders o ON u.id = o.user_id
WHERE o.created_at >= '2024-01-01' AND o.created_at <= '2024-12-31'
GROUP BY u.id, u.name
ORDER BY total_spent DESC
LIMIT 5;Debugging SQL
It works the other way, too. If you have a complex query that isn't working, ask Rephrase to explain it or fix it.
Input: (Your broken query)
Prompt: "Why is this query slow? How can I optimize it?"
Democratizing Data
You don't need to be a data engineer to get answers from your data. With AI assistance, anyone can write complex queries and uncover insights.