Hacker News new | ask | show | jobs
by DaiPlusPlus 1098 days ago
ISO SQL permits aggregate queries returning (“plain ol’ data”) non-aggregate/non-grouping-key columns - but only when the engine can prove a functional-dependency from the grouping-keys - this isn’t exactly the same thing as what SQLite supports (and MySQL 4-5’s weird behaviour was disabled by default in v8) - but Postgres supports it now too.

I don’t know exactly where in the spec it’s defined, though - but I’ve seen people say it was introduced in SQL99.

1 comments

Oh, that's very interesting about the functional dependencies. I'd certainly no idea about that. Interesting discussion, thanks!