Skip to content
Advertisement

SQL Query to calculate the AVG of DATEDIFF

I’m trying to write a query that gives me a gives me the AVG of a Datediff

I have a similar query that I am trying to replicate with my new and here it is:

Here is my output:

Below is the Query I am attempting to create, which takes the same information but adds an additional component where it takes d.OPENS and subtract it to d.DATERLVD and provide me with the AVG for the month:

Advertisement

Answer

Why are you using AND in the SELECT clause? I think you want:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement