Getting Error Can anyone help.

  • 0

    Hi I am getting a runtime error when trying to execute the below code.
    It worked fine in Mysql Workbench. Not sure what the issue is.
    Any help is much appreicated.

    '''# Write your MySQL query statement below
    set @cnt=0;
    set @val=' ';

    select num from (select num, counter from (select num, @cnt := if(@val=num, @cnt+1,1) as counter,@val := num from (select num from Logs) as A) as B where counter >=3) as C;

Log in to reply

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