如何从datestamp获取最近10分钟的数据?

时间:2018-03-27 19:02:21

标签: sql impala hue

删除,因为这是无关紧要的。

1 个答案:

答案 0 :(得分:0)

好的 - 如果我从您的评论中了解到现在有一​​个单独的推文表,并且您想在游戏结束前10分钟选择推文的数量。我不知道推文表的名称,但这样的事情应该有效:

select COUNT(*) from tweets t
where t.tweet_date > 
(select DATE_SUB(g.official_end, interval 10 minute)
 from game g where g.game_id = t.game_id) and t.game_id = 10