What's wrong with this solution


  • 0
    J

    select id
    from weather w1, weather w2
    where w1.temperature > w2.temperature and w1.id - w2.id = 1;


  • 2
    P

    First big mistake is you are using "select id" which is a ambiguous reference. Second mistake i can see right away is you assumed date and id are ordered increasing which you shouldn't assume.

    I can fix it but I will it leave it for you to solve.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.