蜂巢查询以找到转化率
我正在尝试使用Hive的查询,但它无法正常工作。
select
(
(
select
count(*)
from
click_streaming
where
page_id= 'e7bc5fb2-1231-11eb-adc1-0242ac120002'
and is_page_view = 'Yes'
) / (
select
count(*)
from
click_streaming
where
button_id= 'fcba68aa-1231-11eb-adc1-0242ac120002'
and is_button_click= 'Yes'
)
) as conversion_ratio;
错误我正在得到:无法识别“选择”“计数”附近的输入(“在表达式规范中,
我基本上是在尝试获取查看页面的客户的转换率,然后单击按钮预订驾驶室。
I am trying this query in Hive and it's not working.
select
(
(
select
count(*)
from
click_streaming
where
page_id= 'e7bc5fb2-1231-11eb-adc1-0242ac120002'
and is_page_view = 'Yes'
) / (
select
count(*)
from
click_streaming
where
button_id= 'fcba68aa-1231-11eb-adc1-0242ac120002'
and is_button_click= 'Yes'
)
) as conversion_ratio;
Error I am getting: cannot recognize input near 'select' 'count' '(' in expression specification
I am basically trying to get conversion rate of customers who view the page and click the button to book a cab.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是语法的方式。只需加入他们的工作,或使用案件来完成工作即可。
或者您可以重复使用SQL,但您必须加入它们
This is not how the syntax can be. Just join them both or use a case when to do your job.
or you can reuse your SQLs but you got to join them