SELECT `mr`.`id`, `mr`.`views`, `mr`.`reaction`, `mr`.`thumbnail`, `mr`.`video`, `mr`.`created_date`, `t1`.`title` as `team1`, `t2`.`title` as `team2`, (SELECT COUNT(c.id) as total FROM comments c WHERE c.video_id = mr.id AND c.status = 1) as total_comment, COUNT(mr.id) OVER() as total_rows FROM `match_reactions` `mr` LEFT JOIN `matches` `m` ON `m`.`id` = `mr`.`match_id` LEFT JOIN `game_category` `gc` ON `gc`.`id` = `m`.`game_category` LEFT JOIN `counties` `c1` ON `c1`.`id` = `m`.`county_id` LEFT JOIN `leagues` `l` ON `l`.`id` = `m`.`league_id` LEFT JOIN `teams` `t1` ON `t1`.`id` = `m`.`team_id` LEFT JOIN `teams` `t2` ON `t2`.`id` = `m`.`opponent_team_id` WHERE `mr`.`video` != '' AND `mr`.`status` != '2' AND `mr`.`match_id` = '15' GROUP BY `mr`.`half`, `mr`.`time` ORDER BY `mr`.`half` ASC, `mr`.`time` ASC LIMIT 12