#select email from (select email, count(*) as sum from Person group by email) tmp where tmp.sum >= 2;#以邮件字段进行分组,然后用having进行过滤select Emailfrom Persongr Read More
posted @ 2024-01-31 11:27 活出自己范儿 Views(4) Comments(0) Diggs(0) Edit
select IFNULL((select distinct salary from Employee order by salary desc limit 1, 1), NULL) as SecondHighestSalary; Read More
posted @ 2024-01-31 11:23 活出自己范儿 Views(2) Comments(0) Diggs(0) Edit