Created
November 30, 2011 02:39
-
-
Save joevandyk/1407737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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