Tag Archives: postgres

GROUP BY and aggregate functions

Imagine you have the following table ‘users’: id username level points 1 jsmith 10 1000 2 fbloggs 10 2000 2 jdoe 3 100 4 mbloggs 3 1000 5 bdavis 8 500 You can do some pretty interesting stuff with this … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Lessons Learned about Timestamps

I ran into an extremely frustrating issue lately where some Rails code periodically behaved in a very unexpected way. After trying everything I could think of, I ran some code in the console to list the occurrences of the behavior, … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment