All pastes #978802 Raw Edit

Stuff

public sql v1 · immutable
·published 2008-04-09 20:40 UTC
rendered paste body
# get the row for each user based on each userid's max individual expiresSELECT    userid,    expires,    make,    modelFROM (    SELECT        userid,        expires,        make,        model    FROM        tbl1    ORDER BY        userid,        expires DESC) t1GROUP BY    userid