- Queries that are difficult to interpret/verify.
- Non trivial amount of effort to go from question to query: I often feel like I have to jump through hoops to obtain something trivial. I have to think, and I don't want to think.
- Queries that are difficult to interpret/verify.
- Non trivial amount of effort to go from question to query: I often feel like I have to jump through hoops to obtain something trivial. I have to think, and I don't want to think.
> Fundamentally, SQL lacks meaningful abstraction
My RDBMS course at college was really hardcore and SQL code answers for exam questions were enormous.
One neat trick they didn't teach us, but still perfectly legal SQL:1999, is to use WITH recursive constructs.
This way you can decompose very complex queries into simple ones, that can tested independently.
Also, integrating aggregate functions along with row_number() and similar functions to perform more complex work with less code.
IMHO declarative and relational algebra are orthogonal concepts. And why do you say SQL is relational algebra in disguise (paraphrased) ? Most introductions to SQL I've read, but certainly the SQL page on Wikipedia [1], starts with a remark about Codd's relational model. Granted SQL does not implement it perfectly, and it is not perfectly declarative, although that is a matter of taste.
> Non trivial amount of effort to go from question to query: I often feel like I have to jump through hoops to obtain something trivial.
I've had colleagues which expressed similar sentiments, but I have the opposite impression. I think I can express many queries on a much higher abstraction level than with most other languages.
> I have to think, and I don't want to think.
Not wanting to think while writing code is an understandable wish, but also a big red flag about developers for me. Even the best AI with perfect mind reading capabilities will not be able to execute the query you want, if you don't know what you want yourself. Even the AI would guess sometimes right, you would have no way of knowing whether it was right or wrong.
Dude... these are simple queries. I have *far* more important things to ponder than the specific incantations needed to get one of the values that correspond to a maximum.
At least SQL is old enough to get plenty of relevant search results. You can be a copy-paste DJ if you really can't figure it out.
I find 80% of queries that people want across a company are trivial.
I’d have saved myself many many hours over the years if people could just ask a question in natural language rather than asking me to write a query.