Re: Query of Quries - Cfchart

2008-08-18 Thread Dominic Watson
I think you need to look at GROUP BY which will let you write just one query to the db, ie. SELECT Count(id) as nUsers, state FROM users GROUP BY state HTH Dominic ~| Adobe® ColdFusion® 8 software 8 is the most important and dr

Re: Query of Quries - Cfchart

2008-08-18 Thread Michael Fisher
>I think you need to look at GROUP BY which will let you write just one >query to the db, ie. > >SELECT Count(id) as nUsers, state >FROM users >GROUP BY state > >HTH > >Dominic That did the trick. Count along with Group worked great! Thanks!! ~

RE: Query of Quries - Cfchart

2008-08-18 Thread Andrew Scott
Michael, One thing to take into consideration, is that your first query although might be small now. Can you guarantee that it is not going to grow into the thousand of millions? The reason I mention this, is because you should return the records as minimally as possible to begin with. I understa