I'm exploring the idea of using natural language to query databases. The concept is to build a small AI model that translates natural language requests into SQL queries. For example, if someone asks, "Give me all Q3 reports from last year," the AI would convert that into a SQL query like: SELECT * FROM reports WHERE created_at >= DATEFROMPARTS(YEAR(GETDATE()) - 1, 7, 1) AND created_at < DATEFROMPARTS(YEAR(GETDATE()) - 1, 10, 1). What are your thoughts on this approach?
5 Answers
While natural language querying sounds appealing, it may introduce ambiguities. You have to consider business rules and multiple interpretations of terms like "Q3". Sometimes, it’s the small details that make a huge difference. Self-service reporting with solid modeling may provide a better, more reliable solution.
Oh, absolutely! I've seen that business analysts can handle requests effectively without needing to write SQL themselves, thanks to well-structured models.
Honestly, learning SQL is quite manageable. Once you get the hang of it, it feels like a fourth-generation language that’s as natural as it can get.
Not sure how well AI would handle this because natural language can be very context-dependent. I’d be skeptical about trusting AI to interpret and execute queries repeatedly.
I remember tools like Power BI tried something similar, but there’s a lot to consider regarding accuracy and repeatability. We might just be better off sticking to SQL.
I think it's an interesting idea! Many developers have been trying to solve this for two decades. However, the challenge lies in the way natural language can vary so much in interpretation.

Exactly! Plus, traditional SQL forces clarity and precision, which natural language often lacks.