子供(こども)向け英会話コースが充実しているオンライン英会話スクール

MySQLでエラーが発生しました。
SELECT *,sum(bit) as rank FROM eikaiwa_school LEFT JOIN eikaiwa_ad ON eikaiwa_school.id=eikaiwa_ad.school_id WHERE stype like '%子供%' and ('2021-07-28' <= end and '2021-07-28' >= eikaiwa_ad.start) and id <> '' and id <> '210' and id <> '143' and id <> '149' and id <> '58' and id <> '24' and id <> '77' and id <> '85' and id <> '12' and flag is null Group by id ORDER by rank DESC
1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank FROM eikaiwa_school LEFT JOIN eikaiwa_ad ON eikaiwa_school.id=eikaiwa_ad.sc' at line 1