On Thu, 1 Dec 2016 11:12:48 -0800
James Walker <[email protected]> wrote:
> SELECT MIN(PRICE), IDENT FROM INFO;
>
> and get what I want. But in SQLite 2 (legacy code), this doesn't
> work... I get the minimum value, but NULL in the IDENT column.
Does it work with both versions if you write it correctly?
SELECT MIN(PRICE), IDENT
FROM INFO
GROUP BY IDENT;
> I want to find the IDENT of the row with the minimum value of PRICE
That's what quantification was invented for
select * from info
where price in (
SELECT MIN(PRICE)
FROM INFO
);
--jkl
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users