-2

I want to get data from training_course table where current date minus 5 days is equal to training_end_date. Training_end_date is my field in the table. Thanks

GMB
  • 216,147
  • 25
  • 84
  • 135
  • You should try to resolve it on your onw by ussing google or any other tools available on the internet and then ask for doubts on stackoverflow. – Noel Carcases Dec 08 '20 at 15:13

1 Answers1

0

You seem to want:

select * 
from training_course 
where training_end_date = current_date - interval 5 day

Or, if your dates have time components, you maybe want:

select * 
from training_course 
where training_end_date >= current_date - interval 5 day and training_date < current_date - interval 4 day
GMB
  • 216,147
  • 25
  • 84
  • 135