Re:Count(*) Query
Actually, didn't need the "WITH ROLLUP". It works just fine like this as well. "WITH ROLLUP" gives you a grand total as well which you probably don't need. SELECT number, COUNT(number) AS total FROMnumberTable GROUP BYnumber ORDER BYnumber ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re:Count(*) Query
Use the aggregate functions GROUP BY and WITH ROLLUP. I just tested this and it should work just fine for what you're trying to do. Good luck. SELECT numberColumn, COUNT(numberColumn) AS total FROMnumberTable GROUP BYnumberColumn WITH ROLLUP ORDER BYnumberColumn ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4