Support Questions

Find answers, ask questions, and share your expertise

Hive SQL query to find the week of quarter

New Contributor

Hi All,

 

I need help on writing sql query to find the week of quarter. I had a querie which works in sql server

(DATEDIFF(DD, DATEADD(QQ, DATEDIFF(QQ, 0, getdate()), 0), getdate()) / 7) + 1 AS WeekOfQuarter

 

Please suggest work around.

 

Thanks

Amit Sharma

 

1 REPLY 1

Cloudera Employee

Hi, 

 

Can you provide the DDL of the table and some sample data to check this out?

 

Thanks