首页 > 试题广场 >

Hive 中,有表 t_view_log,数据如下: uid

[单选题]
Hive 中,有表 t_view_log,数据如下:
uid
url
dt
u001
www.taobao.com
2023-11-11
u002
www.taobao.com
2023-11-11
u001
www.taobao.com
2023-11-11
u002
www.taobao.com
2023-11-11
u003
www.tmall.com
2023-11-10
u003
www.taobao.com
2023-11-11
需编写 sql 统计出日期在 2023-11-11 这天淘宝网站的 pv 和 uv,以下选项正确的是 ()
  • select count(1) as pv ,count(distinct uid) as uv from t_view_log
  • select count(1) as pv ,count(uid) as uv from t_view_log where dt='2023-11-11'
  • select count(1) as pv ,count(distinct uid) as uv from t_view_log where dt='2023-11-11'
  • select count(distinct uid) as pv ,count(uid) as uv from t_view_log where dt='2023-11-11'
uid即users id...
发表于 2025-08-21 11:32:55 回复(0)