CREATE OR REPLACE VIEW raccordement_clients AS
SELECT t.*
FROM maintenance_ftth_tickets t
WHERE (
    LOWER(COALESCE(t.nature_intervention, '')) LIKE '%raccordement%'
    OR LOWER(COALESCE(t.extra_fields, '')) LIKE '%numeroabonnement%'
    OR LOWER(COALESCE(t.extra_fields, '')) LIKE '%equipe_raccordement%'
    OR LOWER(COALESCE(t.extra_fields, '')) LIKE '%date_enregistrement_instances%'
    OR LOWER(COALESCE(t.extra_fields, '')) LIKE '%date_envoi_instances_prestataires%'
    OR LOWER(COALESCE(t.extra_fields, '')) LIKE '%snont%'
    OR LOWER(COALESCE(t.extra_fields, '')) LIKE '%"module":"raccordement-clients"%'
);
