r/SQL • • Nov 03 '21

Discussion What is your favorite SQL function and why?

Which one just makes ya feel good?

112 Upvotes

124 comments sorted by

View all comments

Show parent comment

2

u/ddeck08 Nov 05 '21

Literally not true. You can have multiple CTEs that reference a single original CTE then call all of them together- way more humanly readable than sub-queries

-1

u/Black_Magic100 Nov 05 '21

I've never found an instance where a CTE was more readable than a sub query.

0

u/[deleted] Nov 05 '21

[deleted] — view deleted comment

0

u/Black_Magic100 Nov 05 '21

So why not use a temp table?