The result of a blogging accident

I hate Oracle

It is officially the most retarded thing ever. Very fussy with GROUP BY and doesn’t like LIMIT. I’ve been helping Laska with it the last two days, and it’s stressful. After spending several hours getting queries working on MySQL, we find that Oracle is retarded and doesn’t like most of them.

The main problem is that with GROUP BY in your SELECT queries, you have to group every column except count(), min(), max(), etc. generated columns. LIMIT in Oracle is done by putting everything in a subquery and use WHERE rownum. For example:

SELECT * FROM (SELECT * FROM oracle_users ORDER BY stress DESC) WHERE rownum <= 5

This would get a list of the top 5 most stressed people in the oracle_users table.

Though it feels great when everything works just as it should. :D

Update: The final SQL query came in at 2205 bytes. This is to look up a list of players teams, then figure out how many games they won and how many they lost, and calculate the difference.