简单查询分析

select brand_id from user_log limit 10; -- 查看日志前10数据

好像也没啥,和SQL相同,,limit取前多少条  , as取别名

查询条数统计分析

count()聚合函数

select count(*) from user_log; -- 用聚合函数count()计算出表内有多少条行数据

hive简单数据分析

distinct不重复

select count(distinct user_id) from user_log; -- 在函数内部加上distinct,查出user_id不重复的数据有多少条

where .. and .. 添加限制条件

select count(*) from user_log where action='2' and brand_id=2661;

 

相关文章:

  • 2021-05-21
  • 2021-07-22
  • 2022-01-04
  • 2021-08-13
  • 2021-05-18
  • 2021-12-23
  • 2021-06-02
  • 2021-05-13
猜你喜欢
  • 2021-04-29
  • 2022-02-28
  • 2021-04-24
  • 2022-12-23
  • 2021-06-04
  • 2021-05-22
  • 2022-01-20
相关资源
相似解决方案