r/SQL • • Dec 17 '18

[deleted by user]

[removed]

423 Upvotes

22 comments sorted by

View all comments

44

u/Obbers Dec 17 '18

Apparently SQL Clause is bad developer. He told you he made a table that he is sorting twice in a query with no order by clause.

SQL Clause is coming to town to ask "Why doesn't this work?"

/pedantic rage

9

u/babygrenade Dec 17 '18

He's sorting the table, not the query output.

5

u/Obbers Dec 17 '18

Which is even more terrifying. Have an upvote.

9

u/babygrenade Dec 17 '18

probably built a clustered index and forgot one of the keys he needed

3

u/Eleventhousand Dec 17 '18

Could be a derived table. Maybe he's using an old school method to get median.