Difficulty to insert NULL operation in argument to count non NULL composer.
SELECT COUNT(*) AS num_rows
WHERE composer NOT IS NULL AS ...;
What I expected to happen:
What actually happened:
Replace this line with the output/error
Welcome to the community!
As per the documentation here (and also here)
If you specify
COUNT returns the number of rows where
expr is not null. You can count either all rows, or only distinct values of
If you specify the asterisk (*), then this function returns all rows, including duplicates and nulls.
COUNT never returns null.
Since we have to count non-null values in the
COUNT(composer) will do the needful.
Hope its clear now?