I have a master table like
CityName, Month, Temperature
A,Jan,20
….
A,Dec,1
B,Jan,30
….
Z,December,12
I would like to generate a differentiation table like
iCity,jCity,Month,DifferentTemperature
A, B, Jan, a.temperature-b.temperature
…
A, Z, Dec, a. temperature-z.temperature
…..
each row would loop through the rest row on a particular month in the master table.
What is the best way to do that? How did you come up an idea to solve this problem?
Thank you very much!
Sounds like you’re looking for a CROSS APPLY Something like