上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: 1 #include <iostream> 2 using namespace std; 3 4 struct A 5 { 6 int v; 7 A(int vv):v(vv) { } 8 const A* getPointer()const {return this;} 9 }; 10 11 in 阅读全文
posted @ 2022-08-19 14:59 balabalahhh 阅读(33) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 using namespace std; 3 class Sample { 4 public: 5 int v; 6 Sample(int n = 0):v(n){}; //设置缺省值为0,没有初值时初始化v = 0 7 Sample(const Sa 阅读全文
posted @ 2022-08-18 22:02 balabalahhh 阅读(63) 评论(0) 推荐(0)
摘要: 1.1393.股票的资本损益 i. 1 # Write your MySQL query statement below 2 SELECT 3 stock_name,SUM(CASE WHEN operation = 'Buy' THEN -price ELSE price END) capital 阅读全文
posted @ 2022-08-10 16:12 balabalahhh 阅读(36) 评论(0) 推荐(0)
摘要: 7-1.1141.查询近30天活跃用户数 i.使用DATEDIFF COUNT里使用的是user_id而不是session_id,因为要查询的是用户数,虽然说每个 session_id 只属于一个用户,但是每个用户可能拥有多个session_id DATEDIFF除了限制<30,还要限制>=0不然会 阅读全文
posted @ 2022-08-09 17:48 balabalahhh 阅读(59) 评论(0) 推荐(0)
摘要: 5-1.175.组合两个表 1)左联结(left outer join),联结结果保留左表的全部数据 2)右联结(right outer join),联结结果保留右表的全部数据 3)内联结(inner join),取两表的公共数据 1 # Write your MySQL query stateme 阅读全文
posted @ 2022-08-08 17:36 balabalahhh 阅读(39) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/lyq105/archive/2009/11/28/1612677.html 阅读全文
posted @ 2022-08-08 16:02 balabalahhh 阅读(7) 评论(0) 推荐(0)
摘要: 1.1667.修复表中的名字 【JMao】简单函数解法+分享刷题经验 - 修复表中的名字 - 力扣(LeetCode) 1 # Write your MySQL query statement below 2 SELECT user_id,CONCAT(UPPER(LEFT(name,1)),LOW 阅读全文
posted @ 2022-08-08 15:55 balabalahhh 阅读(24) 评论(0) 推荐(0)
摘要: 1.1965.丢失信息的雇员 1 # Write your MySQL query statement below 2 SELECT 3 employee_id 4 FROM 5 Employees 6 WHERE 7 employee_id not in (select employee_id f 阅读全文
posted @ 2022-08-06 17:34 balabalahhh 阅读(48) 评论(0) 推荐(0)
摘要: 1.力扣1873.计算特殊奖金 case when: 【SQL】SQL中Case When的用法 - HDWK - 博客园 (cnblogs.com) if : 语法结构:IF(expr,v1,v2) 其中:表达式 expr 为条件式,当 expr 为真是返回 v1 的值,否则返回 v2 i.cas 阅读全文
posted @ 2022-08-03 12:00 balabalahhh 阅读(14) 评论(0) 推荐(0)
摘要: 622. 设计循环队列 - 力扣(LeetCode) C语言 1 typedef struct { 2 int front; 3 int rear; 4 int capcity; 5 int* Elements; 6 } MyCircularQueue; 7 8 9 MyCircularQueue* 阅读全文
posted @ 2022-08-03 10:50 balabalahhh 阅读(30) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页