Topic: Random select in DB
Hi!
I have table where is columns ID and PRICE. Then I have value MAXSUM.
Its possible to select random rows from table if I want SUM(PRICE) of selected rows is <= MAXSUM?
Thanks
Lubos
EDIT:
something like this:
select dattt from data group by dattt having SUM(dattt) < 1 ---- but this query return more rows than SUM <1