SQL pie chart | code.openark.org
http://code.openark.org/blog/mysql/sql-pie-chart
"Shown below is a (single query) SQL-generated pie chart. I will walk through the steps towards making this happen, and conclude with what, I hope you’ll agree, are real-world, useful usage samples."