Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Recreating SQL query

IlliasB22
6 - Meteoroid

Hi all, 

 

I am trying to re-create an SQL query in a workflow that needs to meet three requirements for a customer to be eligible for a discount however I am struggling with how to structure this query:

  • Customer has to have an Amazon code voucher attached to their initial purchase
  • Has to have paid 3 consecutive months on highest tariff(no downgrade)
  • Has to be a live customer

Below is the code I am trying to replicate into a workflow. My initial approach to this is to segment each SELECT statement into separate Input Tools, filter and then join at the end(see workflow below)

IlliasB22_0-1663681761946.png

IlliasB22_2-1663682170992.png

 

Any help would be much appreciated 

1 REPLY 1
mceleavey
17 - Castor
17 - Castor

Hi @IlliasB22 ,

 

first, you don't need separate input tools, this will simply be replicating the extraction.

Second, you can connect In-DB and apply the filters before extracting, but that's a different issue.

 

Without knowing your logic it's going to be different methods for different use cases. Fore example, in your SQL statement you are using a join to another table. You can do the same in Alteryx using the Join tool. The filter can be used to provide a split to give those records that match the True and those that meet the False outcome of the statement.

 

Without seeing your data and how you've configured your workflow it's difficult to say much more.

 

M.



Bulien

Labels