PRQL – A proposal for a better SQL
I both love this (it's very well done!) and hate this, because I feel it misses the forest for the trees.<p>It's like that meme "Nobody says 'I want to be an Excel guru when I grow up.'"<p>SQL is just the means to an end - to alter or retrieve data in a system.<p>We shouldn't be coming up with nicer ways to handle autocompletion, or recursive semantics, or windowing functions.<p>SQL was created to be declarative and human-friendly, to be read aloud.<p>The next evolution of SQL should be natural language.<p>It should be bounded at the schema and enriched with as much context as it can, both about the domain of the data, the data itself, and its relationships within itself and to other schemas.<p>I just want to see all the people in my organization who haven't submitted their timesheet this week; all the orders in my ERP that are waiting for parts from a specific vendor; how much lift I'm getting from my targeted marketing campaign. I just want to delete any contact from CRM who hasn't responded to an email in the last 45 days!<p>I don't want SQL; I want something that translates natural language into a logical plan, and a physical plan; and a separate tool that allows me to express many, many natural language concepts for my bounded schema ... perhaps in a SQL-like way.<p>Like a metrics / definition store on steroids, or just a sea of rich aliases and computed columns and subqueries that can be composed without stressing over syntax or newlines or ordering or complex join conditions.