This question already has answers here:
Get top 1 row of each group (19 answers)
Closed 8 days ago.
The sample code that I am referring to is as follows:
SELECT top(3) * FROM AcceptorRequests
WHERE Terminal IN ('70270191','70347395')
ORDER BY Id DESC
But it works for only one terminal number. I want to display three end records for each terminal.
2条答案
按热度按时间uubf1zoe1#
ztyzrc3y2#
You could use
union all
: