WHERE `white_label_versions`.`url` = ''ĪND `white_label_inclusions`.`entity_type` = 'tour' JOIN `white_label_versions` ON `white_label_versions`.`id` = `white_label_inclusions`.`white_label_version_id` SELECT `white_label_inclusions`.`entity_id`
WHERE `views` curdate() AND tour_stops.active = 1) tour_stop_count