leetcode 619 只出現一次的最大數字

leetcode 619 只出現一次的最大數字

 

select max(num) as num
from (
    select num as num from MyNumbers
    group by num
    having count(num) = 1
) as mn

 

select if(count(num) = 1, num, null) as num
from MyNumbers
group by num
order by num desc
limit 0,1

 

posted @ 2023-05-09 17:57  Carl_ZhangJH  阅读(20)  评论(0)    收藏  举报