1、建设表
2、每个函数的解释
-- 一条SQL解决ALL
SELECT
-- sql四大排序算法
ROW_NUMBER() over(PARTITION by age),
RANK() over(PARTITION by age),
DENSE_RANK() over(PARTITION by age),
NTILE(3) over(PARTITION by age),
-- 时间函数
birth,
NOW(),
CURDATE(),
CURTIME(),
DATEDIFF(NOW(), birth),
ADDDATE(birth, INTERVAL 1 day),
SUBDATE(birth, INTERVAL 1 day)
FROM `专用测试表` test