赞
踩
A:列名
B:表明
C:筛选条件
如果该表是一个分区表,则where条件中必须对分区字段进行限制。
1.count():计数 count(distinct … …)去重计数
2.sum():求和
3.avg():平均值
4.max():最大值
5.min():最小值
from–>join–>on–>where–>group by–>with–>having–>select–>distinct–>order by–>limit
from_unixtime(bigint unixtime,‘string format’)
format:
1.yyyy-MM-dd hh:mm:ss MM代表月份,mm代表分钟
2.yyyy-MM-dd HH:mm:ss HH代表24小时制,hh代表12小时制
3.yyyy-MM-dd hh
4.yyyy-MM-dd
转化成标准的形式后可以用to_date(),year(),month()等函数获取日期、年、月等
datedif
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。