Hello,
I would like to know a better way of attaining this solution by writing sql query and with no temp table involved. I use CTE but I could not arrive at the solution, 1 screenshot is the current result and next screenshot is the expected result
I thought of that way of having temp table and make the update accordingly to fetch the data as I need. But I would like to know is there any other sql Function to set this right in the query itself.
ASKER
I thought of that way of having temp table and make the update accordingly to fetch the data as I need. But I would like to know is there any other sql Function to set this right in the query itself.