自从上次发现这个好用的神仙函数后,超级喜欢用,可今天在hive使用的时候发现居然报错了。。。
行吧,百度了下hive如何实现,记录一下

直接用自己的sql吧

SELECT
	a.brand,
	COUNT(1) brand_count,
	concat_ws('|', collect_set(device)) device_brands,
	sysdate(- 1) dt
FROM
	(
		SELECT
			xxx_xxx [ 'brand' ] brand,
			xxx2 device
		FROM
			xx.xxx_log
		WHERE
			dt = sysdate(- 1)
		AND xx_id = 'xx2018_5131032'
	) a
GROUP BY
	a.brand

呐,就是这样~~~

相关文章:

  • 2021-05-24
  • 2022-02-09
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
猜你喜欢
  • 2022-12-23
  • 2021-12-05
  • 2021-09-27
  • 2022-12-23
  • 2021-07-15
相关资源
相似解决方案