SQLite Forum

useless constant term lead to incorrect output
Login
>(c0 == NULL)

NULL values are unique i.e. unequal to <b>any other</b> value, even another NULL.

Try

>(c0 IS NULL)