Joseph Shraibman <[EMAIL PROTECTED]> writes:
> I'm not clear how this helps. I want to get the last entry of ml.
> The distinct on means I won't get duplicate entries with the same key
> values, but what specifies that I'm getting the last ml value, or even
> one ml value at all?
The DISTINCT ensures you get only one row per f1/f2 combination, and
the use of ORDER BY together with DISTINCT ON forces it to be the row
with the maximal ml value. See the SELECT reference page.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]