This works fine:
SELECT c.id, c.name, c.ascii_name, COUNT(*) AS nr
FROM cities c
INNER JOIN jobs j ON (j.city_id = c.id )
WHERE j.is_active = 1
GROUP BY c.name
limit 100
but when I want to put the condition on th new column nr it says column not found
SELECT c.id, c.name, c.ascii_name, COUNT(*) AS nr
FROM cities c
INNER JOIN jobs j ON (j.city_id = c.id )
WHERE j.is_active = 1 and nr > 100
GROUP BY c.name
LIMIT 100