We have to find all dates Id with higher temperature compare to its previous dates.
id. Recorddate. Temprature
1. 2015-01-01. 10
2. 2015-01-02. 25
The output should be
Id
2
During implicit join I am getting results :
Select w1.id
from weather w1
inner join weather w2
where Datediff(w1.recorddate,w2.recorddate) = 1
and w1.temprature = w2.Temprature
While explicit join I am not getting any result
Select w1.id
from weather w1
inner join weather w2 on w1.id = w2.id
where Datediff(w1.recorddate,w2.recorddate) = 1
and w1.temprature = w2.Temprature
Can you please help me