![](https://img-blog.csdnimg.cn/20190927151132530.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
SQL
文章平均质量分 50
SQL知识记录
只要开始永远不晚
好好学习,天天向上!
展开
-
postgresql查询表结构
postgresql如何查表结构原创 2022-03-02 15:30:55 · 282 阅读 · 0 评论 -
成功解决 SQL查询某列具有最大值的行
通过SQL语句查询某列上具有极值(极大值极小值)的行实际点的例子,假如给我一个成绩单,我想知道:每个同学的哪一门课程分数考得最高。解决思路有四种(in、inner join、left join、开窗函数),希望能帮到你。原创 2021-02-18 18:00:50 · 3561 阅读 · 0 评论 -
Hive分区和分桶的区别和优缺点
彻底搞懂 hive分区表 hive分桶表Hive分区和分桶的区别Hive分区和分桶的优缺点spark分区spark分桶原创 2021-01-12 20:27:09 · 2497 阅读 · 0 评论 -
Hive谓词下推
谓词下推是一种自动优化,如果养成好的查询习惯你其实并不需要hive自动去帮你谓词下推。谓词下推 Predicate Pushdown(PPD):简而言之,就是在不影响结果的情况下,尽量将过滤条件提前执行。原创 2020-04-29 09:44:31 · 1266 阅读 · 0 评论 -
hive case when then 多条件
select substr(key,13,2),case when birthday<'1968' then '50up' when birthday<'1978' then '40-50' when birthday<'1983' then '35-40' when birthday<'1988' then '30-35' when birthday<'1...原创 2018-07-10 17:55:17 · 66080 阅读 · 0 评论 -
窗口函数实现 distinct Distinct window functions are not supported
Distinct window functions are not supported窗口函数实现distinct开窗函数实现distinct分析函数实现distinct原创 2020-09-28 19:47:44 · 2695 阅读 · 0 评论 -
all distinct aggregate functions need to have the same set of parameters
I got the following error in my Impala query:select upload_key, max(my_timestamp) as upload_time, max(color_key) as max_color_fk, count(distinct color_key) as color_count, count...原创 2020-02-07 23:56:09 · 2107 阅读 · 0 评论 -
mysql的索引:MyISAM和InnoDB的索引方式以及区别与选择
https://blog.csdn.net/LJFPHP/article/details/80029968https://blog.csdn.net/qq_36071795/article/details/83956125转载 2019-05-10 16:37:34 · 308 阅读 · 0 评论 -
postgresql模拟死锁
今天教你模拟postgresql实现死锁。1准备create table t1(id int primary key,info character varying(20));insert into dss_pmart.t1 values(22,'hello');insert into dss_pmart.t1 values(23,'world'); 2模拟死锁sessio...原创 2018-12-18 20:22:18 · 1010 阅读 · 0 评论 -
postgresql分析函数
SELECT uid, odate, num,sum(num) over (),sum(num) over (partition by uid),sum(num) over (partition by uid,odate),sum(num) over (order by uid,odate),sum(num) over (order by uid,odate,num),rank() ...原创 2018-10-24 11:08:23 · 3750 阅读 · 0 评论