
SQL
zhangyue
这个作者很懒,什么都没留下…
展开
-
SQL | 查找连续三次出现的记录
createtabletable1 ( Idchar(10), dtdatetime ); insertintotable1values(1,'2020-07-0100:00:00'); insertintotable1values(2,'2020-07-0100:00:01'); insertintotable1values(3,'2020-07-0100:00:02'); insertintotable1values(3,'2020-07-0100:0...原创 2020-07-31 12:53:29 · 1072 阅读 · 0 评论 -
SQL | 分组并选取前N个记录
create table tb(name varchar(10),val int,memo varchar(20)) insert into tb values('a', 2, 'a2(a的第二个值)'); insert into tb values('a', 1, 'a1--a的第一个值'); insert into tb values('a', 3, 'a3:a的第三个值'); insert into tb values('b', 1, 'b1--b的第一个值'); insert into tb v.原创 2020-05-21 10:42:59 · 184 阅读 · 0 评论 -
SQL | SQL的累加,根据年份和类型
@SQL的累加,根据年份和类型 http://sql根据不同的类型和年份 累加值 http://sql根据不同的类型和年份 累加值点击打开链接 点击打开链接 点击打开链接 select a.*, (select sum(price) from Interview as b where b.City=a.City and b.Year <=a.Year ) as sumPrice F...转载 2019-04-01 10:07:29 · 1099 阅读 · 0 评论