SELECT t1.id, t1.name, t1.population, CAST(SUM(t2.town_1) AS CHAR) AS town, CAST(SUM(CASE WHEN t2.id LIKE 23 THEN 1 ELSE 0 END) AS CHAR) AS population FROM area1 t1 LEFT JOIN area2 t2 ON t1.id = t2.id WHERE t1.id like 23
Normally it will match if id = 23 exist in both tables. But it's not the case (not in t1 table) so the request return NULL values.
How i can do to return no result?