sql
文章平均质量分 87
龙池小生
养性事天,修身立命
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数据库sql语句及命令
1、sql 判断一个表是否存在select count(*) from information_schema.tables where table_schema='mydatabase' and table_name ='score';2、查询数据库的表或者模糊查询数据库的表select table_name from information_schema.tables where table_schema='mydatabase' and table_name like '%20191216.原创 2021-08-26 16:16:01 · 1324 阅读 · 0 评论 -
大数据量 分类统计每个类别的排名前三的数据
需求:统计每个类别某项数据排名前几的数据方案:1、sql统计2、sql查询出所有的数据,代码 group 分组取出每个类别的前3个数据3、sql查询每个类别前3数据,union连接起来测试:表结构:添加15万条测试数据:@Before public void getList() { long start = System.currentTimeMillis(); Ranking user; ...原创 2020-12-29 14:34:15 · 39443 阅读 · 0 评论
分享