On 06/29/11 12:34 PM, Gilles Ganault wrote:
> 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?
SELECT round(cast(COUNT(rowid)*100 as real)/(SELECT COUNT(*) FROM
people),2) FROM people WHERE zip="12345";
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users