3 ms·
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
by magicalhippo 6y ago
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/ https://www.sqltutorial.org/sql-window-functions/