HIve sql multiple conditions in where cluase

0 votes

Hi,

My table has created_date, changed_date in datetime format. all I need is pull records from last one hour. so the logic needs to be if created_date or changed_date matches current_date then I want to do something like hour(to_date(created_date)-1) and if changed_date matches current_date.

Thanks in advance

5 days ago in Database by syam
• 120 points

edited 5 days ago by Gitika 19 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
1 answer

IN vs OR in the SQL WHERE Clause

I assume you want to know the ...READ MORE

answered Sep 24, 2018 in Database by DataKing99
• 8,130 points
62 views
0 votes
1 answer

Hcatalog in HIVE

HCatalog supports reading and writing files in ...READ MORE

answered Aug 30, 2018 in Database by kurt_cobain
• 9,310 points
256 views
0 votes
1 answer

Buckets in HIVE

There are two main reasons for performing bucketing ...READ MORE

answered Aug 30, 2018 in Database by kurt_cobain
• 9,310 points
103 views
0 votes
1 answer

Difference between single and double quotes in SQL

Single quotes are used to indicate the ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,710 points
143 views
0 votes
1 answer

STUFF and REPLACE function in SQL

STUFF Function: This function is used to ...READ MORE

answered Sep 27, 2018 in Database by DataKing99
• 8,130 points
147 views
0 votes
1 answer

Auto Increment in SQL

Auto increment keyword allows the user to ...READ MORE

answered Sep 27, 2018 in Database by DataKing99
• 8,130 points
72 views
0 votes
1 answer

How to duplicate IDs with Hive QL / Impala / Python

Based on your example, supposing id2 always ...READ MORE

answered Oct 1, 2018 in Python by Priyaj
• 57,530 points
65 views
0 votes
1 answer

HIVE DATA LOADING ERROR

Dear Raghu, Hope you are doing great. It is ...READ MORE

answered Dec 17, 2017 in Data Analytics by Sudhir
• 1,610 points
298 views
+1 vote
2 answers

Execute Pig Script from Grunt Shell

From your current directory run  pig -x local Then ...READ MORE

answered Oct 25, 2018 in Big Data Hadoop by Kunal
1,184 views
0 votes
3 answers

What is Hive? Is Hive a database?

Hive is a data Warehouse infrastructure/system built ...READ MORE

answered Jul 1, 2019 in Big Data Hadoop by Ved Gupta
9,085 views