On 29 June 2011 11:34, Gilles Ganault <gilles.gana...@free.fr> wrote: > On Wed, 29 Jun 2011 11:33:15 +0200, Roger Andersson > <r...@telia.com> wrote: >>SELECT (COUNT(rowid)*100)/(select count(*) from people) FROM people WHERE >>zip="12345"; > > Thanks, that worked: > > SELECT COUNT(*) FROM people; > 400599 > > SELECT COUNT(*) FROM people WHERE zip="12345"; > 12521 > > SELECT (COUNT(rowid)*100)/(SELECT COUNT(*) FROM people) FROM people > WHERE zip="12345"; > 3 > > Is it possible to display the number with decimals instead of an > integer?
http://www.sqlite.org/lang_expr.html#castexpr > Rgds, Simon _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users