I have a table with these 3 columns: task (string) status (string) date (datetime) I want to write a query that does the…