postgresql
TRUNCATE TABLE table_name // 删除表中数据
regexp_split_to_table(substr(列名1,1,LENGTH (列名1) - 1),'\|') as 列名2 // 按照某个字段进行拆分
coalesce(字段名,替换值) // 将null替换为自定义值
select * from table_name2 where (列名1,列名2) not in (select 列名1,列明2i from table_name1) limit 100 // 比较两个表的内容,找出多的部分
to_char(to_timestamp(destination_in_utc),'yyyy-MM') as time //将时间戳转化为时间
with a as(
select split_part('tianjin-shanghai','-',1) as relation) ,
b as(select split_part('tianjin-shanghai','-',2) as relation)
select case when a.relation<b.relation then a.relation||b.relation else b.relation||a.relation end re from a,b // 两个字段进行组合
sparksql
to_timestamp(cast(time as string),'yyyy-MM') //将int型转换为string型,并将时间戳转换为日期
mongodb
$where: "this.Time > 1540515188" // 条件筛选