I have a Query with three fields
StockId
Date
OrderId
I want to Max(Date) and Group StockId and get the OrderId
However, it is required to do GROUP BY OrderId in SQL and this will
return every record.
I just need that OrderId, and this thing won't let me.
By the way, StockIds have duplicated OrderId.
StockId
Date
OrderId
I want to Max(Date) and Group StockId and get the OrderId
However, it is required to do GROUP BY OrderId in SQL and this will
return every record.
I just need that OrderId, and this thing won't let me.

By the way, StockIds have duplicated OrderId.