Using 3rd party software; the software requires a SQL statement. Looking to find AVG count for records between two date columns for the current year. Using a datecreate and current_timestamp.
Thanks folks.
Using 3rd party software; the software requires a SQL statement. Looking to find AVG count for records between two date columns for the current year. Using a datecreate and current_timestamp.
Thanks folks.
See if the W3Schools site can help starting with: https://www.w3schools.com/sql/sql_count_avg_sum.asp
That is my first go to place, but it didn't work for me. I am having issues keeps giving me an error; "looking for an argument"!~
Are you using SQL Server i.e. does it have to be T-SQL?
Can you post your SQL statement and indicate what part gives the error
It doesn't have to be TSQL.
I should be able to achieve results for a count of records between date field columns, correct?
AVG (datediff(week,[columndate_1, columndate _2)
First thanks for your help.
Second, the 3rd party software is limited if you use their setup.
Third, you can use the 3rd party setup without their template(s) and it worked.
Now, for the bonus question , the below statement works. But how do I get the avg per week for only 1 year?
SELECT AVG(DATEDIFF(week,DATE_CREATED, CURRENT_TIMESTAMP ))
FROM RI_RECORD
WHERE R_STATUS = 'A'
AND INSP_STATUS = 'W'
See if my answer in this thread is of any help:
https://www.accessforums.net/showthread.php?t=70092