Deleted tickets are showing up in a SQL query

Deleted tickets are showing up in a SQL query

I'm trying to write a query that shows me all tickets that are missing a time entry, so I can make sure the agents are logging their time accurately. My script is:

  1. SELECT "Request ID", "Ticket Owner Name", "Created Time","Department Name"

  2. FROM "Tickets"

  3. LEFT JOIN "Time Entry" ON "Time Entry"."Request"  = "Tickets"."ID"  LEFT JOIN "Agent" ON "Agent"."ID"  = "Time Entry"."Agent"

  4. WHERE (MONTH(Tickets."Created Time")  = MONTH(Curdate())
    AND YEAR("Created Time")  = YEAR(CURDATE()))

  5. AND "Executed Time"  is NULL
However, this report this pulling in deleted tickets and I can't find an identifier that would indicate a ticket has been deleted. Help or thoughts appreciated!