没事的时候刷题leetcode的时候遇到dense_rank的使用。 create table Scores ( Id int, Score decimal(5,2) ) go select Score,row_number() over (order by Score desc) as Rank ...
分类:
其他好文 时间:
2020-11-08 17:20:44
阅读次数:
20
一、分析函数语法function_name(<argument>,<argument>...) over(<partition_Clause><order by_Clause><windowing_Clause>);function_name():函数名称argument:参数over( ):开窗函 ...
分类:
数据库 时间:
2020-11-07 17:03:30
阅读次数:
24
[default] callback_whitelist = profile_tasks # The best way I’ve found to time the execution of Ansible playbooks is by enabling the profile_tasks cal ...
分类:
其他好文 时间:
2020-11-04 19:01:00
阅读次数:
20
数据库 con.Execute(string.Format(@"CREATE TABLE Category ( Id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, Name VARCHAR (50) NOT NULL, Pid INTEGER, Creati ...
分类:
数据库 时间:
2020-10-27 10:51:41
阅读次数:
31
Reference: [Dockerfile Security Best Practices] Container security is a broad problem space and there are many low hanging fruits one can harvest to m ...
分类:
其他好文 时间:
2020-10-24 11:48:16
阅读次数:
37
###题目 121. Best Time to Buy and Sell Stock ###解题方法 用一个变量minprice记录当前已经遍历过的最小价格,再用一个变量maxprofit记录当前已经遍历过的最大利润,如果price[i] > minprice,就计算最大利润是否需要增加;否则计算最 ...
分类:
其他好文 时间:
2020-10-21 21:19:48
阅读次数:
21
参考 https://www.cnblogs.com/brankoliu/p/10845491.html ...
分类:
数据库 时间:
2020-10-21 20:27:42
阅读次数:
25
代码结构如下: 1、html部分 <div class="tab"> <router-link tag="div" class="tab-item" to="/recommend"> <span class="tab-link">推荐</span> </router-link> <router-li ...
分类:
其他好文 时间:
2020-10-18 17:05:42
阅读次数:
27
select a.name Aname,b.*,c.* from navtype_table a,(SELECT NumSerial,navtype_id FROM (SELECT NumSerial,navtype_id, @navtype_id_rank := IF(@current_navty ...
分类:
数据库 时间:
2020-10-13 17:32:31
阅读次数:
31
题目描述 分析 方法一(线段树) 线段树维护的是以当前节点为左端点的区间的贡献 而区间的右端点则会从 $1$ 到 \(n\) 逐渐右移 当我们把右端点从 \(i-1\) 的位置扩展到 \(i\) 的位置时 如果原先区间的最近公共祖先到根节点的路径中经过 \(a[i-1]\) 和 \(a[i]\) 的 ...
分类:
其他好文 时间:
2020-10-07 21:33:49
阅读次数:
17