3 ms·
> He explained you don't need a group by in a having statement and that I needed to go back and study sql. I sat there awkwardly [I have been writing sql since
by gruez 7y ago
> He explained you don't need a group by in a having statement and that I needed to go back and study sql. I sat there awkwardly [I have been writing sql since I was 14 - I was 25].
He's technically right though. For instance in postgres, you don't need to have a GROUP BY clause when using HAVING https://www.postgresql.org/docs/current/sql-select.html#SQL-HAVING https://www.postgresql.org/docs/current/sql-select.html#SQL-...
- deleted 7y ago[deleted]
- __s 7y agoSQL isn't the most portable language. Postgres has special behavior for aggregates/having without group by which essentially creates an implicit group by, other engines will raise an error (SQL Server iirc) Clearly not something to nitpick over in an interview
- war1025 7y ago"Technically correct", the most irritating form of "correct"
- Infernal 7y agoAlso, technically the only form of correct.