Hmm. I'm trying to fix the question itself so we can answer it. For reference, the original text was: we had one table, one of column contains negative and positive values, how can we get required data by using BETWEEN ... AND Operator. Example: we are using below syntax, select * from FactTable where Lats between 5 and -5 (Hopefully this will survive, and not break this question!)
As indicated, it has just happened again on a different question Original question was: Just Trying to understand about this operator and it is consuming 40 percent of the cost when looking at the excution plan. Here is the replica of the query that I am using: select
Final_res.id, (select id_desc from lookup_table where id =
Final_res.id ) as Desc ( select * from (select * from (select *, rownumber as rn from table1 ) where rn=1) R1 inner join (select * from (select *, rownumber as rn from table2 ) where rn=1) R2 on
R2.id) Final_res Actual execution plan says there is stream aggregate on top of lookup_table (table scan) What is this operator and is there a way we can get rid of it?