Text 2 SQL AI for Your Database
SQL is tough. It's a language that's as powerful as it is meticulous, demanding precision and a deep understanding of complex syntax. We can now go from text to SQL, offloading the effort for querying your database to AI.
This sounds really awesome, but what does it actually look like in action?
Going from Text to SQL #
At ChatDB, we are big on "eating our own dogfood". We use ChatDB on a daily basis to get insights on our data and app usage. We connected ChatDB to our Supabase instance, and we've been able to ask really interesting questions and get instant insights.
For instance, when we needed to analyze our signups per day, we didn't dive into lines of SQL code. Instead, we simply asked ChatDB:
Show me the breakdown of user signups in the last 60 days with signups by day
Here's what ChatDB did for us:
- Analyze the tables to query — The AI understands which tables and fields to access for the requested data.
- Write the SQL to get you the answer — It then generates the SQL query needed to fetch the information.
- Query your database and return data in a table — Finally, ChatDB executes the query and presents the data in an easy-to-understand format.
What SQL did ChatDB write? #
Curious about the SQL magic behind the scenes? With a click on the code icon, ChatDB reveals the underlying SQL used to fetch your data.
Creating charts so you can understand the data! #
But it's not just about getting the data; it's about visualizing it in a way that makes sense at a glance. That's why ChatDB doesn't just stop at tables; it gives you charts.
Here's a bar chart that illustrates user signups per day:
And an area chart that shows the trend over the last 60 days:
In conclusion, AI's Text 2 SQL capability is more than a convenience; it's a transformation in how we interact with data. With ChatDB, you're not just querying data; you're engaging in a dialogue, where insights are a conversation away.