-- 1月21日、期限切れの日付だけ検索 select id from deadlines where expiry<>"" and expiry<"2027-01-21"; -- 申込期限を過ぎ、申込日が空欄 select id,apply_by from deadlines where apply_by<>"" and apply_by<"2027-01-21" and submitted=""; -- 申込済み・更新の証拠待ち select id from deadlines where submitted<>"" and evidence=""; -- 日付を決められない行 select id from deadlines where expiry="" or apply_by="";