problem.non_public = 'f' and problem.state in 
    ('confirmed', 'investigating', 'planned', 'in progress', 
     'fixed', 'fixed - council', 'fixed - user', 'closed') and 
    (council like '%'||?||'%' or council is null) and 
    areas like '%,'||?||',%'