摘要: 链接:https://leetcode.cn/problems/employees-with-missing-information/ 我的代码 方法一 select employee_id from Employees where employee_id not in (select employ 阅读全文
posted @ 2022-07-02 18:53 孤舟浮岸 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode.cn/problems/remove-duplicates-from-sorted-array/ 我的代码 int removeDuplicates(int* nums, int numsSize){ int diff = 0,now = nums[0]-1, 阅读全文
posted @ 2022-07-02 18:32 孤舟浮岸 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode.cn/problems/patients-with-a-condition/ 我的代码 select * from Patients where conditions like 'DIAB1%' or conditions like '% DIAB1%' 提交 阅读全文
posted @ 2022-07-02 18:18 孤舟浮岸 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode.cn/problems/group-sold-products-by-the-date 我的代码 select sell_date, count(distinct(product)) num_sold, GROUP_CONCAT(distinct(produc 阅读全文
posted @ 2022-07-02 18:07 孤舟浮岸 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode.cn/problems/fix-names-in-a-table 我的代码 select user_id, concat(ucase(left(name,1)),lcase(substr(name,2))) name from Users order by u 阅读全文
posted @ 2022-07-02 17:32 孤舟浮岸 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode.cn/problems/duplicate-emails/ 我的代码 select distinct a.email from person a inner join person b on a.id!=b.id and a.email = b.email 提 阅读全文
posted @ 2022-07-02 17:11 孤舟浮岸 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode.cn/problems/sqrtx/ 我的代码 int mySqrt(int x){ long res=0,i; for(i=1;i<=x;i++){ if(i*i>x){ break; } } res=i-1; return res; } 提交结果 提交结果 阅读全文
posted @ 2022-07-02 17:09 孤舟浮岸 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode.cn/problems/employees-earning-more-than-their-managers/ 我的代码: select a.name Employee from employee a where a.salary> (select b.sal 阅读全文
posted @ 2022-07-02 17:07 孤舟浮岸 阅读(33) 评论(0) 推荐(0) 编辑