NULL is missing, not the string 'None'. Test with IS NULL. COALESCE fills a default.
Goal
Print who is missing a price.
import sqlite3
con = sqlite3.connect(":memory:")
con.execute("CREATE TABLE t (city TEXT, price REAL)")
con.executemany("INSERT INTO t VALUES (?, ?)", [("Nairobi", 10.5), ("Kisumu", None)])
print(con.execute("SELECT * FROM t WHERE price IS NULL").fetchall())
con.close()import sqlite3
con = sqlite3.connect(":memory:")
con.execute("CREATE TABLE t (city TEXT, price REAL)")
con.executemany("INSERT INTO t VALUES (?, ?)", [("Nairobi", 10.5), ("Kisumu", None)])
print(con.execute("SELECT city, COALESCE(price, 0) FROM t").fetchall())
con.close()import sqlite3
con = sqlite3.connect(":memory:")
con.execute("CREATE TABLE t (price REAL)")
con.execute("INSERT INTO t VALUES (NULL)")
print(con.execute("SELECT COUNT(price), COUNT(*) FROM t").fetchone())
con.close()import sqlite3
con = sqlite3.connect(":memory:")
print(con.execute("SELECT NULL = NULL, NULL IS NULL").fetchone())
con.close()