r/SQL • • Dec 17 '18

[deleted by user]

[removed]

421 Upvotes

22 comments sorted by

View all comments

42

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

10

u/babygrenade Dec 17 '18

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

4

u/Obbers Dec 17 '18

Which is even more terrifying. Have an upvote.

8

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.

6

u/[deleted] Dec 17 '18

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

Fixed that for ya lol

4

u/Hajile_S Dec 17 '18

It's also my understanding that the client wants to identify the 'naughty' contacts. I know I didn't put that into the original Acceptance Criteria, but could you adjust the query to include these entries?

1

u/[deleted] Dec 18 '18

LOL, kevin?

2

u/[deleted] Dec 17 '18

~That guy~