SELECT * 
FROM `fao-maps-review.movebank.vw_all_studies`
WHERE (
        @sensor_type = "all" or 
        regexp_contains( sensor_type_ids_filter ,concat('(;|^)',@sensor_type,'(;|$)'))
      ) AND
      (
        @taxon_class = "all" or 
        regexp_contains( class_ids_filter ,concat('(;|^)',@taxon_class,'(;|$)'))
      ) and 
      created_at >= @start_date and created_at <= @end_date 