Live data from Hacker News

SQL is now 50 What is coming next to the query language?

coderoasis.com

11–20 of 22 posts

Re: SQL is now 50 What is coming next to the query language?

#11
post #5

The best thing to happen in sql in recent times is snowflake starting to allow an extra comma in the end of the expression list lol. Now I can ask all the DBAs in my life to stop formatting their queries comma first!

Yeap BigQuery also recently added allowing some trailing commas, although not everywhere e.g. not inside structs etc. Definitely makes things much easier.

There are lots of relaxations they could make that would help tooling and templated stuff, e.g. allowing FROM before SELECT and allowing multiple WHEREs and allowing comparision/hashing of structs and arrays and things.

About the only rss feed I ever see is the BigQuery announce one; they actually make interesting incremental improvements all the time, e.g. recently added a RANGE type and functions (although it works for dates and timestamps, but not integers; argh, so close...)

Re: SQL is now 50 What is coming next to the query language?

#13
This article is pure garbage. Here are some of its sins: * It says that SQL was introduced in 1974 and could be used for web applications (the web was invented in 1989). * Then it calls AI “Artistical Intelligence”. * And it never even talks about the topic of its title: what’s next for SQL.

Re: SQL is now 50 What is coming next to the query language?

#14
post #9

Times up. LLMs are uniquely suited to convert data requests to SQL at compile-time. All ORMs will converge on this feature “scan your table layout and generate smarter queries with Knexjs Pro+” - one can see it coming. My mother raised me as a broke single mother because she could write SQL. I bought a home in my California home town because I could write good SQL and tune my.cnf. I suppose my toddler will never SELE…

The reason the big focus on LLMs generating SQL was that SQL is somewhat more natural language like? It doesn't mean that LLMs generate sensible or even correct SQL.

I work at a big company with big data and sometimes trawl the query logs to speed things up and recently noticed an uptick in WTF queries that, I suspect, have had some AI 'assistance' ;)

Re: SQL is now 50 What is coming next to the query language?

#15
post #9

Times up. LLMs are uniquely suited to convert data requests to SQL at compile-time. All ORMs will converge on this feature “scan your table layout and generate smarter queries with Knexjs Pro+” - one can see it coming. My mother raised me as a broke single mother because she could write SQL. I bought a home in my California home town because I could write good SQL and tune my.cnf. I suppose my toddler will never SELE…

Absolutely not. For example, there is literally nothing at all in common between a Postgres query and a Clickhouse query except some very basic surface-level syntax.

(And even then lots of things are incompatible, e.g., count(*) vs count())

Re: SQL is now 50 What is coming next to the query language?

#16

It really is mind boggling, how come the forced bloat did not yet reach SQL. Of course people try very hard to "innovate" (ehm, the proper word would be poison) in this space, by adding more abstractions, confuse things with overly complex solutions or create syntax that just can't be remembered. So if you have the feeling that you need to elevate yourself above the crowd by complicating things, package it and sell i…

Window functions very much fits the pattern of "forced bloat".

Re: SQL is now 50 What is coming next to the query language?

#17
post #5

The best thing to happen in sql in recent times is snowflake starting to allow an extra comma in the end of the expression list lol. Now I can ask all the DBAs in my life to stop formatting their queries comma first!

Not only Snowflake: https://play.clickhouse.com/play?user=play#U0VMRUNUIAogIDEsC...

Re: SQL is now 50 What is coming next to the query language?

#18
post #9

Times up. LLMs are uniquely suited to convert data requests to SQL at compile-time. All ORMs will converge on this feature “scan your table layout and generate smarter queries with Knexjs Pro+” - one can see it coming. My mother raised me as a broke single mother because she could write SQL. I bought a home in my California home town because I could write good SQL and tune my.cnf. I suppose my toddler will never SELE…

Absolutely not. For example, there is literally nothing at all in common between a Postgres query and a Clickhouse query except some very basic surface-level syntax. (And even then lots of things are incompatible, e.g., count(*) vs count())

You don't have to write `count()` in ClickHouse - `count(*)` is also ok.

... while `count()` makes more sense from the engineering perspective: it is an aggregate function that takes zero number of arguments.

I personally prefer `count()`, but when my friends write `count(*)` or even `COUNT(*)`, they are still my friends.

Re: SQL is now 50 What is coming next to the query language?

#20
post #7

Is there really anything missing from SQL? I guess adding a few semantic shortcuts like Postgres' SELECT DISTINCT ON (x) are useful. But otherwise this feels like asking what's coming next for Algebra.

One use-case that other systems support is doing queries with a time budget..Eg find me all columns that match a search within 50ms.

Not sure now to do that with postgres.

Post reply on HN