RE: SELECT...GROUP BY WITHIN GROUP BY

2006-11-30 Thread Kerry Frater
2006 20:56 To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: SELECT...GROUP BY WITHIN GROUP BY I'm not sure that this is exactly what you want, but I think you can use the WITH ROLLUP modifier: select district, town, street, surname, count(surname) from test5 group by district asc

Re: SELECT...GROUP BY WITHIN GROUP BY

2006-11-28 Thread ddevaudreuil
I'm not sure that this is exactly what you want, but I think you can use the WITH ROLLUP modifier: select district, town, street, surname, count(surname) from test5 group by district asc, town asc, street asc, surname asc WITH ROLLUP Here's a link to the MySQL documentation on WITH ROLLUP

RE: SELECT...GROUP BY WITHIN GROUP BY

2006-11-28 Thread Kerry Frater
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 28 November 2006 20:56 To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: SELECT...GROUP BY WITHIN GROUP BY I'm not sure that this is exactly what you want, but I think you can use the WITH ROLLUP modifier