get max of a query?
i want to get the max of this query.
<cfquery datasource="intranet" name="getMaxstars">
select submitterdept, sum((rating1+rating2+rating3+rating4+rating5)/5)/count(1) average_rating
from CSEReduxResponses
group by submitterdept
order by 2 desc;
</cfquery>
<cfset myarray=[submitterdept] >
<cfoutput query="getMaxstars">
<h1>#ArrayMax(myarray)#</h1>
</cfoutput>
this code doesnt work. the query does, it will output 3 rows , so from this rows i want to get
the max of submitterdept, is there a different way to do this?
with the code abobe i get 'Variable SUBMITTERDEPT is undefined.'
