SELECT * FROM (SELECT @ROWNUM := @ROWNUM + 1 AS ROWNUM, `problem_id`,`title`,`source`,`submit`,`accepted` FROM `problem`, (SELECT @ROWNUM := 0) TEMP WHERE `defunct`='N' AND `problem_id` NOT IN ( SELECT `problem_id` FROM contest c INNER JOIN `contest_problem` cp ON c.`contest_id` = cp.`contest_id` AND (c.`defunct` = 'N' AND c.`start_time`<='2021-06-16 07:29' AND '2021-06-16 07:29'<c.`end_time`)) ORDER BY `problem_id` ) A WHERE ( title like ? or source like ?) LoongsonOJ
  
Title Solved Submit