摘要:
https://leetcode.com/articles/friend-requests-i-overall-acceptance-rate/ The divisor (total number of requests) could be '0' if the table friend_reque 阅读全文
posted @ 2018-10-22 10:34
ffeng0312
阅读(330)
评论(0)
推荐(0)
摘要:
SELECT question_id FROM [survey_log] group by question_id order by sum(case when action = 'answer' then 1 end)/cast(sum(case when action = 'show' then 阅读全文
posted @ 2018-10-22 10:02
ffeng0312
阅读(196)
评论(0)
推荐(0)
摘要:
select a.name from candidate a inner join ( select candidateid, count(*) no_of_votes from vote group by candidateid order by no_of_votes desc limit 1) 阅读全文
posted @ 2018-10-22 09:55
ffeng0312
阅读(170)
评论(0)
推荐(0)
摘要:
select avg(id) from ( SELECT n1.id,(sum(n2.frequency)-n2.frequency) as left,sum(n2.frequency) as right FROM [number] n1, number n2 where n2.id <= n1.i 阅读全文
posted @ 2018-10-22 09:54
ffeng0312
阅读(332)
评论(0)
推荐(0)
摘要:
select ranking.id, ranking.company, ranking.salary,ranking.rank,cnt FROM ( SELECT e1.id,e1.company,e1.salary,count(*) rank FROM [employee569] e1, (sel 阅读全文
posted @ 2018-10-22 09:52
ffeng0312
阅读(340)
评论(0)
推荐(0)
摘要:
All leetcode sql solution: https://datageekinme.github.io/portfolio/zepl-0005/ select e1.Name from [Employee] e1 inner join ( SELECT ManagerId FROM [E 阅读全文
posted @ 2018-10-22 09:51
ffeng0312
阅读(162)
评论(0)
推荐(0)

浙公网安备 33010602011771号