I have a table which contains a datetime column:


table|foo|foo|2|CREATE TABLE foo (

        dttm    datetime        not null

        i int             not null

)



I want to select out the max(i) value for each day where there are multiple
records per day.



select date(dttm) dt,max(i) from foo group by dt order by 1;



However, it’s returning only 1 row, with no date column shown. How can I
get an actual “date” listed in the first column, and also get 1 row per
“date” value.



|5283598256
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to