I have the following MS SQL query
select top 10 RegisterTime
from orderNotifications
order by RegisterTime asc
How can I get the max of RegisterTimethis request?
I tried this
select max(RegisterTime) in (
select top 10 RegisterTime
from orderNotifications
order by RegisterTime asc
)
But I get
Msg 156, Level 15, State 1, Line 1 Invalid syntax next to the keyword 'in'.
Msg 156, Level 15, State 1, Line 4 Incorrect syntax next to the keyword 'order'.
source
share