Kristoff1875 Posted March 7, 2017 Share Posted March 7, 2017 I have a column called 'Progress' which updates as a row is processed. I have the following to count how many are in which stage: SELECT Progress, COUNT(*) AS counter FROM finished GROUP BY Progress Inside this I would also like to count where progress has the value of "1", but where there is a note added. So for example: SELECT * FROM finished WHERE Progress=1 AND notes != 0 Is it possible to check both of these things in the same query and group them separately? Quote Link to comment https://forums.phpfreaks.com/topic/303384-counting-multiple-levels/ Share on other sites More sharing options...
requinix Posted March 7, 2017 Share Posted March 7, 2017 So notes is 0 or 1? Add it to the list of columns returned by the query and add it to the list of columns grouped by the query. Quote Link to comment https://forums.phpfreaks.com/topic/303384-counting-multiple-levels/#findComment-1543880 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.