I am trying to use QUALIFY to filter the data without seccess (in SQL SERVER) also, I do not want to create a table with the row_number in the SELECT statement and then use WHERE clause.
select *
from [dbo].[DWH_TicketThread_View]
where 1=1
and threadtype in (313,347,349,385,392,417)
and TicketId = 651353
qualify row_number() over(partition by ticketid order by updatedate desc) = 1