摘要:
select *,max(date) over(partition by user_id order by date ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING) as ls_date from login 这里开窗的话可以通过rows betw 阅读全文
摘要:
排序:ORDER BY 语句用于根据指定的列对结果集进行排序。LIMIT x,y表示从x开始取y条数据,数据库是从第0条开始的。 SELECT * FROM table ORDER BY 列名 DESC LIMIT 0,1; 按照最后两个字母排序: substr(first_name,-2) 选择最 阅读全文
摘要:
这篇主要记录一下真正使用linux时候遇到的一些问题以及解决的方法。 复制粘贴 控制台下的复制粘贴:ctrl+insert shift+insert 终端下:ctrl+shift+c/v xxx is not in the sudoers file 1.切换到root用户下 方法为直接在命令行输入: 阅读全文
摘要:
class Solution: def removeKdigits(self, num: str, k: int) -> str: stack = [] for item in num: while stack and stack[-1]>item and k>0: k-=1 stack.pop(- 阅读全文