the table videos has the folowing feels
id,average,name
how can i write the query, to select the name of video, which have the max average!!!
i can do that vith two queries, by selecting the max(avege) from the table, and then find out the name, where ihe average equal to max!!! but i want to do that in one query!!!
help me please!!!
the table videos has the folowing feels id , average , name how can
Share
You can use an
ORDER BYwith aLIMIT:ORDER BY average DESCorders the rows in order of descendingaverage(i.e. the first row will have anaverageequal toMAX(average)).LIMIT 1causes only the first row to be returned.