Query is leaving out rows

I have a simple webpage that uses the following query to show me how many emails are in the notifications table waiting to be sent. Most of the time it works great. But when there are some emails that have type = ‘Group Email’ no rows are returned even though I know for a fact that there is tons of emails waiting to go out.

Any ideas?

Thanks!

select priority, type, count(*) as total from notifications where sent is null group by type order by priority

that query is fine

if it’s not showing you any results for a specific type, then there are only two possibilities – there are no rows in the table for that specific type, or there are some rows in the table for that specific type, but none of them have a null sent column