Usage of Group By and Order By in Mysql
The table from which I have tried to read
Here I am trying to read the rows which has the latest TransactionDate and
grouped by StackHistoryID.
So I thought of using "order by TransactionDate desc" first then the
latest row will be top and if I use group by after that it will give what
i have wanted. But I figured that, We can not use groupby after using
orderby. So I struck here, Is there any way to get what I have wanted
using a single query.
No comments:
Post a Comment