在表达式规范中的'('''ORDER'附近缺少BY

时间:2017-06-30 15:47:09

标签: sql hive pyspark type-mismatch percentile

我收到此错误:

  

u“第2:34行在'''''''''''''''''''''''''   规范\ nline 2:41输入“BY”预期不匹配   表达式规范中的“ORDER”;“

我跑的时候:

customer_cutoff3=sqlContext.sql("""
select category,
PERCENTILE_DISC(0.4) WITHIN GROUP (ORDER BY ty_spend) OVER (PARTITION BY category ) as low_spend_cutoff
from customer_cutoff2
where ty_visits>0
group by category
""").toPandas()

有人可以帮帮我吗?

0 个答案:

没有答案
相关问题