I have this as my Average Statement and am wanting to get the Median Value:
select AVG (DATEDIFF("m", dlg_applicationreceived, dlg_dateofdecision)) as TimetakenAVG, format(dlg_dateofdecision, 'MMM-yy') as MonthDate from dlg_ast group by format(dlg_dateofdecision, 'MMM-yy') order by format(dlg_dateofdecision, 'MMM-yy')
I've played around with some of the previous answers to Median Questions, but can't get mine to work correctly.
Any help would be most appreciated. Thanks