Count does not returns zero

Hi! I am having this trouble:
When I run this query:

 SELECT 
    code,
    COUNT(*) AS count_values 
FROM table
WHERE x = 'ABC'
    AND {{date}}
    AND y = {{code}}
    AND z = 1
group BY 1

This is the result:


But when I run this query:

 SELECT 
     COUNT(*) AS count_values 
FROM table
WHERE x = 'ABC'
    AND {{date}}
    AND y = {{code}}
    AND z = 1

My result becomes this:
2

Is there any way to get the second result with the first query? I need the zero result.

Hi @Helena
Does your database return a zero or nothing? If it returns nothing, then Metabase will show "No results".
Post "Diagnostic Info" from Admin > Troubleshooting, and which database type you're querying.

1 Like

My database is returning nothing, but when I call only the count the query returns zero.