Hive:DQL(查询操作)

查询操作1

  • select 字段列表 
    from 表名
    where 条件 
    group by 分组字段 
    having 分组条件
    order by 排序条件 desc顺序
    limit 限制条数;
    ------------------------------------------------------
    select '140421', ip, count(ip) as cnum f
    rom hmbbs 
    where logdate='140421' 
    group by ip 
    having cnum > 50 
    order by cnum 
    desc limit 20;

猜你喜欢

转载自blog.csdn.net/JinChao94/article/details/111609580