Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hauntor_hhdirectory2.t1.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
SELECT t1.*, COUNT(DISTINCTROW t2.`name`) num_top, COUNT(DISTINCTROW t3.`name`) num_bottom, COUNT(DISTINCTROW t4.`name`) num_account FROM `dir_pages` t1 LEFT JOIN `dir_pages` t2 ON FIND_IN_SET('1', t2.`menus`) > 0 LEFT JOIN `dir_pages` t3 ON FIND_IN_SET('2', t3.`menus`) > 0 LEFT JOIN `dir_pages` t4 ON FIND_IN_SET('3', t4.`menus`) > 0 WHERE t1.`status` = 'active' GROUP BY t1.`name` ORDER BY t1.`order`