Teradata SQL


  • 0
    C

    Using Teradata SQL, but it seems doesn't work.
    '''
    SELECT M.Num
    FROM Logs M
    INNER JOIN (SELECT B.*
    FROM Logs A
    INNER JOIN Logs B ON A.Id = B.Id - 1
    WHERE A.Num = B.Num) N ON N.Id = M.Id - 1
    WHERE M.Num = N.Num;

    Can anyone tell me is this correct?


Log in to reply
 

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