Hacker News new | past | comments | ask | show | jobs | submit login

I'd add "be aware of window functions"[1]. Certain gnarly aggregates and joins can often be much better expressed using window functions.

And at least for the database we use at work, if the sole reason for a join is to reduce the data, prefer EXISTS.

[1]: https://www.sqltutorial.org/sql-window-functions/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: