-1
I am trying to solve this problem
This is my code
create table #tbl
(
x int,
y int,
rn int -- row number
)
-- order by X ASC before inserting into #tbl
insert into #tbl select x, y, row_number() over (order by x) from functions order by x asc
-- select * from #tbl
declare @maxrn int...