Employee Bonus --leetcode
生活随笔
收集整理的這篇文章主要介紹了
Employee Bonus --leetcode
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
2019獨角獸企業(yè)重金招聘Python工程師標準>>>
leetCode sql沒幾道題 就開始 收費模式了
Select all employee's name and bonus whose bonus is < 1000.Table:Employee+-------+--------+-----------+--------+ | empId | name | supervisor| salary | +-------+--------+-----------+--------+ | 1 | John | 3 | 1000 | | 2 | Dan | 3 | 2000 | | 3 | Brad | null | 4000 | | 4 | Thomas | 3 | 4000 | +-------+--------+-----------+--------+ empId is the primary key column for this table. Table: Bonus+-------+-------+ | empId | bonus | +-------+-------+ | 2 | 500 | | 4 | 2000 | +-------+-------+ empId is the primary key column for this table. Example ouput:+-------+-------+ | name | bonus | +-------+-------+ | John | null | | Dan | 500 | | Brad | null | +-------+-------+這些被鎖的題目 不能在線驗證了solution:SELECTEmployee.name, Bonus.bonus FROMEmployeeLEFT JOINBonus ON Employee.empid = Bonus.empid WHEREbonus < 1000 OR bonus IS NULL ;Note: "LEFT OUTER JOIN" could be written as "LEFT JOIN".轉(zhuǎn)載于:https://my.oschina.net/u/2277632/blog/1589125
總結(jié)
以上是生活随笔為你收集整理的Employee Bonus --leetcode的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 对于三次握手的疑问
- 下一篇: Swift中的循环强引用 【使用无主引