写hive 用in 如分时段,分类型,分平台统计点击量 select substr(createtime,12,2) hour,logtype,os_id,count(*) from wizad_mdm_raw_hdfs raw where ad_id in ('19829','19830','19831','26657d5ff9020d2abefe558796b99584') and adn=5 group by substr(createtime,12,2),logtype,os_id
测试环境 Hive 1.2.1000.2.6.0.3-8 set hive.support.concurrency=true; set hive.exec.dynamic.partition.mode=nonstrict; set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; set hive.compactor.initiator.on=true; ; drop table tmp_ccc_20180716;
本博文的主要内容如下: Hive文件存储格式 Hive 操作之表操作:创建外.内部表 Hive操作之表操作:表查询 Hive操作之表操作:数据加载 Hive操作之表操作:插入单表.插入多表 Hive语法结构:where 查询.all 和 distinct 选项.基于 Partition 的查询.基于 HAVING 的查询. LIMIT 限制查询. GROUP BY 分组查询. ORDER BY 排序查询.SORT BY 查询.DISTRIBUTE BY 排序查询.CLUSTER BY 查询 H