本文主要是介绍mysql从入门到起飞+面试基础题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
mysql基础
MySQL基础
企业面试题1
代码
select m.id,m.num
from
(
select t.id as id,count(1) num
from
(
select ra.requester_id as id
from RequestAccepted raunion all
select ra.accepter_id as id
from RequestAccepted ra
) t
group by t.id
) m
group by id
order by num desc,id
limit 1
结果
总结
select from union union all where group by having order by limit
这篇关于mysql从入门到起飞+面试基础题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!