"Ben-Nes Michael" <miki@xxxxxxxxxxxx> writes:
> Just wonder, how can i do:
> select max(column1), column2 from table;
> its saying:
> ERROR: Attribute table.column2 must be GROUPed or used in an aggregate
> function
> and all i want is that column2 value will be the mate fo column1 max?
You want DISTINCT ON ... see the weather-reports example on the SELECT
man page.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|