摘要:
https://leetcode.com/articles/students-report-by-geography/ select America,Asia, Europe from ( select @row_id:=@row_id+1 as row_id, name as America fr 阅读全文
posted @ 2018-10-23 19:51
ffeng0312
阅读(461)
评论(0)
推荐(0)
摘要:
https://leetcode.com/articles/average-salary-departments-vs-company/ select date_formate(pay_date,'%Y-%m') pay_month, e.department_id, (case when avg( 阅读全文
posted @ 2018-10-23 11:22
ffeng0312
阅读(265)
评论(0)
推荐(0)
摘要:
https://nifannn.github.io/2017/10/27/SQL-Notes-Leetcode-614-Second-Degree-Follower/ select followee f1.follower, count(f1.follower) num from follow f1 阅读全文
posted @ 2018-10-23 10:55
ffeng0312
阅读(568)
评论(0)
推荐(0)
摘要:
select min(abs(p2.x-p1.x)) shortest from point p1,(SELECT * FROM [point] order by x) p2where p1.x > p2.x 阅读全文
posted @ 2018-10-23 10:43
ffeng0312
阅读(125)
评论(0)
推荐(0)
摘要:
https://leetcode.com/articles/shortest-distance-in-a-plane/ Note: To put the MIN() inside of SQRT() will slightly improve the performance. select roun 阅读全文
posted @ 2018-10-23 10:33
ffeng0312
阅读(313)
评论(0)
推荐(0)
摘要:
SELECT x,y,z,(case when x+y>z and x+z>y and z+y>x then 'yes' else 'no' end) triangle FROM [triangle]; 阅读全文
posted @ 2018-10-23 10:01
ffeng0312
阅读(136)
评论(0)
推荐(0)

浙公网安备 33010602011771号