chiprivers Posted April 23, 2007 Share Posted April 23, 2007 Is it possible to return an additional column in a record set that shows the number of records that have been grouped when using the GROUP BY command? Quote Link to comment https://forums.phpfreaks.com/topic/48305-solved-quantiy-grouped/ Share on other sites More sharing options...
Wildbug Posted April 23, 2007 Share Posted April 23, 2007 Try COUNT(*). Quote Link to comment https://forums.phpfreaks.com/topic/48305-solved-quantiy-grouped/#findComment-236151 Share on other sites More sharing options...
fenway Posted April 23, 2007 Share Posted April 23, 2007 E.g. SELECT yourField, COUNT(*) FROM yourTable GROUP BY yourField Quote Link to comment https://forums.phpfreaks.com/topic/48305-solved-quantiy-grouped/#findComment-236188 Share on other sites More sharing options...
chiprivers Posted April 23, 2007 Author Share Posted April 23, 2007 Perfect Quote Link to comment https://forums.phpfreaks.com/topic/48305-solved-quantiy-grouped/#findComment-236266 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.