![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
shanghai_in_summer
这个作者很懒,什么都没留下…
展开
-
presto日期函数
presto中的常见时间函数原创 2023-02-13 17:40:53 · 680 阅读 · 0 评论 -
presto中的分位数
...原创 2022-11-16 19:14:44 · 1547 阅读 · 0 评论 -
MySQL建表语句模板
CREATE TABLE report2.hottopic_direct_summary( `id` int(11) NOT NULL AUTO_INCREMENT, `direct` int(11) NOT NULL COMMENT '是否为直投,1:直投,0:暗投', `money` int(11) ...原创 2019-02-20 21:38:48 · 10690 阅读 · 0 评论 -
Hive表修改
1. 修改列信息:ALTER TABLE table_nameCHANGE COLUMN old_column_name new_column_name data_typeCOMMENT '....'AFTER column2;原创 2019-03-20 17:38:03 · 207 阅读 · 0 评论 -
在跳板机(Xshell)连接mysql的方法
1、在跳板机连接mysql的模式: mysql -h服务器 -u用户名 -p密码。注意,“-h”和“服务器”之间没有空格,“-u用户名”和“-p密码”也类似。2、在跳板机执行mysql代码并将输出结果保存至指定文件: mysql -h服务器 -u用户名 -p密码 -e" select var1, var2, ... from table where ... " &...转载 2019-04-27 11:52:48 · 2209 阅读 · 0 评论 -
spark Sql 读取数据
1、读取parquet格式数据,例:val a = spark.read.parquet("hdfs://emr-cluster/.../2019-07-16/part-8e2a5828-417c-c000.snappy.parquet")//scala版未完待续原创 2019-07-17 12:17:27 · 148 阅读 · 0 评论 -
Hive 中的时间
select UNIX_TIMESTAMP() as temporary_timestamp, --当前时间的时间戳 UNIX_TIMESTAMP('2011-12-07 13:01:03') as specified_timestamp, --指定时间的时间戳 FROM_UNIXTIME(1568106212) a...原创 2019-09-10 17:47:18 · 125 阅读 · 0 评论