随笔分类 - sql
摘要:求中位数档次 drop table if exists class_grade; CREATE TABLE class_grade ( grade varchar(32) NOT NULL, number int(4) NOT NULL ); INSERT INTO class_grade VALU
阅读全文
摘要:窗口函数 mysql8增加的一个极其强大的统计函数 窗口函数加排序 // 1,2,3,4,5,6 row_number()over() row_number()over(partition by cloum1 order by cloum2) // 1,2,2,3,3,4 dense_rank()o
阅读全文
摘要:输入: drop table if exists `salaries` ; CREATE TABLE `salaries` ( `emp_no` int(11) NOT NULL, `salary` int(11) NOT NULL, `from_date` date NOT NULL, `to_d
阅读全文