Member since
08-07-2013
2
Posts
0
Kudos Received
0
Solutions
08-15-2013
10:12 AM
Thanks for the reply. I was able to figure out the issue. Thank you though!
... View more
08-07-2013
04:16 PM
Hey, I am running into an issue where the same query is giving me different results when ran on hive vs. impala. I can't figure out what the the problem could be that results in the different results. Here's the query: SELECT TO_DATE(dtFirstActive) as valid_date, vchpromocode as publisher, SUM(CASE WHEN TO_DATE(dtbillingdate) > TO_DATE(dtfirstactive) AND TO_DATE(dtcancel) <> TO_DATE(dtfirstactive) THEN 1 ELSE 0 END) as trials, SUM(CASE WHEN TO_DATE(dtbillingdate) <= TO_DATE(dtfirstactive) AND TO_DATE(dtcancel) <> TO_DATE(dtfirstactive) THEN 1 ELSE 0 END) as prepaids, SUM(CASE WHEN TO_DATE(dtcancel) = TO_DATE(dtfirstactive) THEN 1 ELSE 0 END) as same_day_cancels, FROM sql.Account WHERE vchPromocode = 'GFAPPIOS01' or vchPromocode = 'GFAPPIOS02' or vchPromocode = 'GFAPPAND01' or vchPromocode = 'GFAPPAND02' GROUP BY TO_DATE(dtFirstActive), vchpromocode Any help be would be great! Sam
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Impala