We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Amazon Redshift

MilindG
12 - Quasar

Anyone has experience using Amazon Redshift? 

 

I'm creating a report where I'm comparing yoy data. I'm looking to get MTD result vs Same month LY result.

 

Another database where i'm using below sql query where its bringing me current month

'Where Date >= DateAdd(mm, DateDiff(mm, 0, DateAdd(dd, DateDiff(dd, 0, GetDate()) - 1, 0)), 0)
and Date <= DateAdd(dd, DateDiff(dd, 0, GetDate()) - 1, 0)'

 

and for the PY current month I'm using this query

'Where Date >= dateadd(mm, datediff(mm, 0, getdate()) - 12, 0)
and Date <= dateadd(ms, -3, dateadd(mm, datediff(mm, 0, getdate()) - 11, 0))'

 

I haven't used sql or redshift that often so please help!

 

1 REPLY 1
apathetichell
20 - Arcturus
Labels
Top Solution Authors