独自開発ツールなど、スカイプ以外の通信体制があるオンライン英会話スクール

MySQLでエラーが発生しました。
SELECT *,sum(bit) as rank FROM eikaiwa_school LEFT JOIN eikaiwa_ad ON eikaiwa_school.id=eikaiwa_ad.school_id WHERE (stype like '%独自ツール%' or stype like '%スカイプ以外%') and ('2021-07-27' <= end and '2021-07-27' >= eikaiwa_ad.start) and id <> '' and id <> '43' and id <> '210' and id <> '29' 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