Rick Ratchford <r...@amazingaccuracy.com> wrote: > How would you write the SQL statement that would return the maximum > number of a sample? > > For example, if within the SampleNumber column, the SampleNumber 17 > had more records (say there are 23 SampleNumber = 17 in the table, > more than any other), you wanted to return the value 23?
select max(c) from ( select count(*) c from mytable group by SampleNumber ); -- or select count(*) c from mytable group by SampleNumber order by c desc limit 1; > Is group_concat used here? You haven't shown any code. Had you done so, I could have easily told you whether or not you used group_concat in it. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users