Hi all, I have this mysql query: SELECT date_format( date, '%v' ) AS Week, sum( if( initial = 'Scanner', 1, 0 ) ) AS Count FROM comments WHERE ( tool_id = 'LDNA-01' AND initial = 'Scanner' ) GROUP BY Week ORDER BY Week ASC LIMIT 0 , 30
It results in this result: Week Count 36 3 38 3 39 3 40 1 42 4 44 1 45 1 As you can see that for Work Week 37 and 41, there is no Count value as condition does not match. I want a ZERO to be inserted for these Work Weeks as well as my work week column has to be continuous. Thanks Shukla
