Cecil Westerhof wrote:
> SELECT   idletime, COUNT(*)
> FROM     vmstat
> GROUP BY idletime
>
> But because there are about 400.000 records (and counting) it is not the
> most convenient information. Instead of the number of records I would like
> to have the percentage of the records. Is this possible?

SELECT idletime, COUNT(*) / (SELECT COUNT(*) FROM vmstat) * 100 ...

> how would I work with slices, say: 0-5, 6-10, 11-15, … 96-100.

Instead of 100, multiply with 20, then cast to integer, and multiply with 5.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to