Hello,
Do you know why this command doesn't work ?
> select * from T;
x|y
-+-
1|1
1|2
2|1
2|2
2|3
> select X,Y from T group by X having Y=min(Y);
ERROR: Illegal use of aggregates or non-group column in target list
My goal is quite simple : get only one line per X value (the value which is
returned for Y is not important as long as it's one of the values linked to
the right X).
The query "select X,Y from T group by X" works under MySQL and
returns exactly what I want, how can I do it in PostgreSQL ?
Thanks for your help,
Alain