Now I need to find out how many days there is between CreateDate and PaymentDate for an average user. Example: The SQL returns "10" if the average between CreateDate and PaymentDate is 10 days.
Hope someone please can help me solving this :)
Microsoft SQL ServerMicrosoft SQL Server 2008SQL
Last Comment
webressurs
8/22/2022 - Mon
Sharath S
Can you post some sample result of your query and the expected result?
Are you looking for datediff between CreateDate and PaymentDate?
You have used Datetime as column alias. One suggestion is not to use keywords as aliases. If you really want, you need to use it as [Datetime].
Are you looking for datediff between CreateDate and PaymentDate?
You have used Datetime as column alias. One suggestion is not to use keywords as aliases. If you really want, you need to use it as [Datetime].