Calling all Racers for the Alteryx Grand Prix! It's time to rev your engines and race to the stage at Inspire! Sign up here.

Alteryx Designer Discussions

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

Recreating SQL query

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)




Any help would be much appreciated 

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.