hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raj Hadoop <hadoop...@yahoo.com>
Subject Oracle to Hive
Date Wed, 10 Jul 2013 21:30:04 GMT
 
All,
 
Can anyone give me tips on how to convert the following Oracle SQL to a Hive query.
 
 
SELECT a.c100, a.c300, b.c400
  FROM t1 a JOIN t2 b ON a.c200 = b.c200
 WHERE a.c100 IN (SELECT DISTINCT a.c100
                             FROM t1 a JOIN t2 b ON a.c200 = b.c200
                            WHERE b.c400 >= SYSDATE - 1)
   AND b.c400 >= SYSDATE - 1
   AND a.c300 = 0
 
 
The SYSDATE can be replaced by date_sub(FROM_UNIXTIME(UNIX_TIMESTAMP(),'yyyy-MM-dd') , 1)
in Hive.
 
But I wanted to know the rest of the query. Any pointers or tips so that I can start on my
own.
 
Thanks in advance.
 
Regards,
Raj
Mime
View raw message