leetcode

Leetcode submissions
git clone git://git.laack.co/leetcode.git
Log | Files | Refs | README

biggest-single-number.sql (248B)


      1 --Find the largest number in a list
      2 --of records where there are no repeats
      3 --of the number
      4 --Time: 800ms Beats: 77.74%
      5 
      6 SELECT MAX(num) AS num
      7 FROM MyNumbers
      8 WHERE num NOT IN (
      9   SELECT num
     10   FROM MyNumbers
     11   GROUP BY num
     12   HAVING COUNT(*) > 1
     13 );