[Solved] Showing records that has higher value than one specific record


EDIT:

with cte as
    (
     select T1.Name,T1.NameId,T2.Value from T1 join T2
     on T1.NameId=T2.NameId 
    )

select Name,Value from cte cte1
where cte1.Value>(select max(cte2.Value) from cte cte2 where cte2.Name=@name)

2

solved Showing records that has higher value than one specific record