Tim Martin wrote:
Does anyone have any working solutions for calculating the mode of a set of values in SQLite?
I'm not exactly sure what "mode" is. From your examples, it seems you want to get an element that occurs most often. This should do it:
select salary, count(*) occurs from payroll group by salary having occurs=(select count(*) c from payroll group by salary order by c desc limit 1)
Igor Tandetnik

