problem.non_public = 'f' and problem.state in
    ('confirmed', 'investigating', 'planned', 'in progress',
      'fixed', 'fixed - council', 'fixed - user', 'closed',
     'action scheduled', 'not responsible', 'duplicate', 'unable to fix',
     'internal referral' ) AND
    (council like '%'||?||'%' or council is null) and
    areas like '%,'||?||',%'