Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

hiveql - sum by dates (Hive)

I want to sum(boolean field 1/0, int, "orders") by date(timestamp field, "event_date").

I have tried to do that but I have got output only for one date

Select to_date(event_date), sum(orders) from table where to_date(event_date) > '2021-01-01' group by to_date(event_date)

DB HIve

Can you help me what I do wrong here ?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...