CREATE DATABASE `_mo`;
CREATE DATABASE IF NOT EXISTS `_mo`;
CREATE DATABASE IF NOT EXISTS `_mo` DEFAULT CHARACTER SET latin1;
SELECT COUNT(*), GROUP_CONCAT(`t1`.`user_id` SEPARATOR ',')
FROM `table` AS `t1`
JOIN `table` AS `t2` ON `t2`.`user_id` = `t1`.`user_id`
AND `t1`.`visit_date` = :date1
AND `t2`.`visit_date` = :date2