Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:1407737
1 2 3 4 5 6 7 8 9 10 11 12
-- pg 9.2 (should also work with 9.1)
tanga_dev=# select users.id, users.username from users inner join points on points.user_id = users.id group by users.id;
id | username
----+-----------------
6 | active_user
4 | normal
 
 
-- pg 9.0
tanga_dev=# select users.id, users.username from users inner join points on points.user_id = users.id group by users.id;
ERROR: column "users.username" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: select users.id, users.username from users inner join points...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.