ユーザー (メッセージの所有者、送信者) がオーストラリア出身で 21 歳でなければならない、1 年以上前のパブリック メッセージをすべて削除する必要があります。
エラーが発生します:
***#1064 - SQL 構文にエラーがあります。MySQL サーバーのバージョンに対応するマニュアルで、2 行目の「inner join User inner join City inner join Country where Message.messa」を使用する正しい構文を確認してください***。
私のテキストはタスクの半分もカバーしていないので、誰かがここで私を助けることができれば.
これが私のコードです:
delete
from Message
inner join User
inner join City
inner join Country
where Message.message_type=0 and
datediff(curdate(),Message.posted) >366 and
User.user_id=Message.owner_id and
datediff(User.date_of_birth,
str_to_date('1/01/1991', '%m/%d/%Y')) < 366 and
City.city_id=User.city_id and
Country.country_id=City.country_id and
Country.name='Australia'