I want to write a query using DATEDIFF
Function in SQL.
When I try
SELECT AVG(DATEDIFF(hh,raise_date,(select min(added_note) from t_case_note) ))
FROM mytable
I get the error message
Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
How can I achieve this?