T-SQL 101: 115 Repetitively selecting with CROSS APPLY, OUTER APPLY
We saw in previous post that we had a function called GetRecentOrders that gets the most recent orders for a particular cinema.
But what if we want to do that for all the cinemas?
If I’d like the two most recent orders for every cinema, that becomes messy. I can’t just do that with a join, like an inner join or outer join. The function provided is fine. We can use that, but we want to call it for every row in the table.
2025-02-14