Presto 学习和使用笔记
1.presto 表连接查询的连接条件中不支持使用函数
比如下面的脚本在presto中运行会报错
select t1.period_start_date, t2.statistic_date
from
(select
distinct calendar_date as period_start_date, calendar_date as period_end_date
from
edw_public.dim_esf_edw_pub_date
where calendar_date >= '${开始时间}' and calendar_date <= '${结束时间}'
) t1
left join
(select
statistic_date
,xf_agent_id as agent_id
from
edw_agents.adm_xf_edw_agents_performance_daily_report_edw_001_di
where 1=1
) t2 on date(statistic_date) <= period_start_date and date(statistic_date) <= period_end_date
但是只要把连接条件中的date函数去掉则可以正常运行
select t1.period_start_date, t2.statistic_date
from
(select
distinct calendar_date as period_start_date, calendar_date as period_end_date
from
edw_public.dim_esf_edw_pub_date
where calendar_date >= '${开始时间}' and calendar_date <= '${结束时间}'
) t1
left join
(select
statistic_date
,xf_agent_id as agent_id
from
edw_agents.adm_xf_edw_agents_performance_daily_report_edw_001_di
where 1=1
) t2 on statistic_date <= period_start_date and statistic_date <= period_end_date
Presto 学习和使用笔记的更多相关文章
- hadoop2.5.2学习及实践笔记(二)—— 编译源代码及导入源码至eclipse
生产环境中hadoop一般会选择64位版本,官方下载的hadoop安装包中的native库是32位的,因此运行64位版本时,需要自己编译64位的native库,并替换掉自带native库. 源码包下的 ...
- Python学习的个人笔记(基础语法)
Python学习的个人笔记 题外话: 我是一个大二的计算机系的学生,这份python学习个人笔记是趁寒假这一周在慕课网,w3cschool,还有借鉴了一些博客,资料整理出来的,用于自己方便的时候查阅, ...
- 开始记录学习java的笔记
今天开始记录学习java的笔记,加油
- 菜鸟教程之学习Shell script笔记(上)
菜鸟教程之学习Shell script笔记 以下内容是,学习菜鸟shell教程整理的笔记 菜鸟教程之shell教程:http://www.runoob.com/linux/linux-shell.ht ...
- Presto 学习参考资料
Presto 文档资料: 0.1版:Presto 0.100 Documentation 0.213版:Presto 0.213 Documentation 阿里云 presto 学习资料:https ...
- Presto 学习
Presto 基础知识与概念学习可以参考这些博客: presto 0.166概述 https://www.cnblogs.com/sorco/p/7060166.html Presto学习-prest ...
- hadoop2.5.2学习及实践笔记(四)—— namenode启动过程源码概览
对namenode启动时的相关操作及相关类有一个大体了解,后续深入研究时,再对本文进行补充 >实现类 HDFS启动脚本为$HADOOP_HOME/sbin/start-dfs.sh,查看star ...
- 深度学习Keras框架笔记之AutoEncoder类
深度学习Keras框架笔记之AutoEncoder类使用笔记 keras.layers.core.AutoEncoder(encoder, decoder,output_reconstruction= ...
- 深度学习Keras框架笔记之TimeDistributedDense类
深度学习Keras框架笔记之TimeDistributedDense类使用方法笔记 例: keras.layers.core.TimeDistributedDense(output_dim,init= ...
随机推荐
- project proposal写作框架
主要有八个因素: 背景(Your Background):对于proposal有意义的要点,如国家职业证书.技能.经验.能力和实习经历等. 大纲(Outline Proposal):描述你明确的感兴趣 ...
- webpack浅析~
1.webpack打包原理: 把所有依赖打包成一个 bundle.js 文件,通过代码分割成单元片段并按需加载. 2.webpack的优势: ①.webpack 是以 commonJS 的形式来书写脚 ...
- oracle闪回的使用
1.闪回查询(原理:依赖于UNDO表空间)查询当前SCN号select current_scn from v$database;误删数据以后select * from table_name as of ...
- dwr的ScriptSession和HttpSession分析
1.关于ScriptSession ScriptSession不会与HttpSession同时创建 当我们访问一个页面的时候,如果是第一次访问,会创建一个新的HttpSession,之后再访问的时候, ...
- Mac本如何卸载MySQL
Mac本如何卸载MySQL 在Mac上卸载MySQL上一件非常麻烦的事,如果没有卸载干净,就会无法安装新的MySQL 怎样才能完全卸载MySQL呢?(包括所有数据库) 执行以下操作: #打开终端 ...
- 组合覆盖与PICT的使用
组合覆盖法是一种有效减少测试用例个数的测试用例设计方法.根据覆盖程度的不同,可以分为单因素覆盖.成对组合覆盖.三三组合覆盖等.其中又以成对组合覆盖最常用. 关于组合覆盖的更多内容,参考:http:// ...
- cxListView和dbgrid联动
procedure TForm1.FormCreate(Sender: TObject); begin ClientDataSet1.First; while not ClientDataSet1.E ...
- nginx_tcp模块集成到openresty(安装ngx_tcp_lua_module模块)
git地址:https://github.com/bigplum/nginx-tcp-lua-module openresty 本身是使用http协议进行通讯的, 但是项目中经常有要求输入是使用tcp ...
- web应用的乱码解决
用get方式请求,不同的浏览器对参数的编码不一样,导致在服务器的编码处理麻烦. 解决方案: 利用javascript中的方法encodeURI对其进行编码(默认为"UTF-8") ...
- 【LeetCode每天一题】3Sum Closest(最接近的三数和)
Given an array nums of n integers and an integer target, find three integers in nums such that the s ...