When any of the fields that I am retrieving contains null results (see picture 2), I get <<No Results! This may be the answer you’re looking for. If not, try removing or changing your filters to make them less specific.>> as a result.
I have tried in different ways to transform the null results into values of zero, but unsuccessfully so. I have tried to use the 'COALESCE([field], 0)' and the 'IFNULL([field], 0)' functions, but they unfortunately do not affect the results (pics 3 and 4).
(These seemed to work for other people in other cases: here for the COALESCE function, and here for the IFNULL function).
I attach here a few screenshots that show the SQL code. These show when the code works, when the fields at issue do not contain null values (pic 1), and when the code does not work (pic 2), even with the use of the COALESCE and IFNULL functions (pics 3 and 4 respectively).
I know for sure that the results of the field that is causing trouble ('# of resource ratings') are values of zero. As they are not showing as zero values, I am assuming that they have NULL values instead, but this is just an assumption and I may be mistaken. Anyway, the problem remains!
Thank you in advance for your help, it is very much appreciated!
Hi @mattia
Post "Diagnostic Info" from Admin > Troubleshooting.
I don't know which database type you're querying, but guessing MySQL.
Your optional filter clauses are wrong. It should be: [[AND date(...
@mattia It will not be fixed by the upgrades, but security will be improved. See the stackoverflow question, since it seems like it's a quirks of MySQL and not anything specific to Metabase, then you can find better answers on forums specific to your database type.