1.去重distinct :select distinct pt_human_id from flow_human_library;
2.like模糊查询:select * from flow_human_info where name like '郭少';
sql中的通配符%才代表任意字符:select * from flow_human_info where name like '郭少%' ;
select * from flow_human_info where name = '郭少';
3.两张表联合查询:select * from flow_human_library,flow_human_info where flow_human_library.pt_human_id=flow_human_info.human_id;
4.子查询:(SELECT AVG(salary) FROM ( SELECT * from `salaries` ORDER BY salary desc LIMIT 100 offset 0 ) as c(别名))
5.ordey by排序
6.desc降序:select count(*),human_crednum from XFACE.HUMAN_INFO_SUB where facelib_id='1234567890' group by human_crednum order by count(*) desc;aic升序
7.having用法:select count(*) from (select facelib_id,count(rowKey) c from XFACE.HUMAN_INFO_SUB where facelib_id='12345676899' group by rowKey,facelib_id having c>1)
8.group by分组 几个字段分组,select后面必须也得添加几个字段
9.时间戳转换:按F12,在console页面,输入new Date(1572451200000),查询出中国标准时间
10.atob() 方法:用于解码使用 base-64 编码的字符串。按F12,在console页面,输入atob('图片url')