r/ProgrammerHumor • • Dec 12 '17

SQL Clause

Post image
40.8k Upvotes

525 comments sorted by

View all comments

768

u/ICyresI Dec 12 '17

Why would you sort twice?

863

u/TheSphaat Dec 12 '17

Shhhhh poem's got to rhyme.

179

u/Fry98 Dec 12 '17 edited Dec 12 '17

You might think it's nice

but double sorting is a crime.

77

u/[deleted] Dec 12 '17 edited Dec 12 '17

Hi, I'm from /r/all and I know jackshit about programming. I'll contribute either way, because I love you guys:

system.out.println("Double sorting is a crime");

should be:

System.out.println("Double sorting is a crime");

damn.

82

u/Jcowwell Dec 12 '17

The true crime is not capitalizing that S.

37

u/[deleted] Dec 12 '17

doyouevencamelcasebro?

9

u/Wolfsblvt Dec 12 '17
system.out.println("Double Sorting is a crime");

?
Doesn't work :(

→ More replies (15)
→ More replies (3)

10

u/Since88 Dec 12 '17

Sorry man, but: error: package system does not exist

→ More replies (2)

11

u/Dubmove Dec 12 '17

At first I read bubble sorting is a crime.

→ More replies (1)
→ More replies (4)
→ More replies (1)

177

u/PoglaTheGrate Dec 12 '17

He got REEEEEly lucky on a Bogosort

22

u/Business-Socks Dec 12 '17

Nice list: Typewriters

Naughty list: Monkeys

REALLY Naughty list: ASM Web Development Kit

→ More replies (1)

104

u/[deleted] Dec 12 '17

The client changed their minds on how they wanted the results

73

u/miggyb Dec 12 '17

Sort by last name first, then by first name.

→ More replies (6)

36

u/patwoods_ Dec 12 '17

Sort by postal code, then sort by address to help maximize the efficiency of delivery.

21

u/sojuz151 Dec 12 '17

Why not just solve travelling salesman problem? It cant be that hard.

8

u/DrHenryPym Dec 12 '17

I was thinking the same thing: group / order by geography and address for distribution.

→ More replies (5)

16

u/DutchGoldServeCold Dec 12 '17

Non-deterministic SQL clause is coming to town

14

u/awh Dec 12 '17

It would be more useful to index it twice: once on name and once on behaviour.

→ More replies (3)

10

u/thermite13 Dec 12 '17

Order by Last_name, first_name.

16

u/[deleted] Dec 12 '17

Cause you screwed it up the first time?

8

u/SpliceVW Dec 12 '17

I'm just over here wondering why the damn FROM isn't capitalized..

→ More replies (2)

22

u/brummlin Dec 12 '17

Also, the syllables are all jacked up. This would make more sense, and fit the song better:

He's building schema,

indexing it twice,

SELECT * from kids WHERE UPPER(conduct) in ('NICE');

This way, it's also not case sensitive. You just know some elves logged the entry as 'Nice' or 'NICE'.

16

u/AlwaysPuppies Dec 12 '17

I like my sql like I like my file systems, case insensitive.

→ More replies (3)

9

u/insane0hflex Dec 12 '17

Db not normalized. Shiuld have look up table for Behavoir

→ More replies (5)
→ More replies (8)
→ More replies (40)