ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

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

IN DB: Using a table or existing list as part of Connect In DB SQL

5 - Atom

Hi All,


So say I have two tables: table A has members  table B has the transactions of all members

What I want to be able to do if first get the members i care about from table A, then use that list to find specific transactions for the members in table B


I have one connect in-db tool pulling a list of people/members/ids(that I care about)

I have a separate connect in-db tool pulling the transactions of all members (which is exceptionally large)


What I want to do is get the list of members, then somehow use that list of members to run then use that list as a filter or as the basis of my next sql pull of how many events that member/person/id has had within a certain time frame.

13 - Pulsar

It sounds like a Join In-DB will be best solution for you.

5 - Atom

Simplistic idea: Do an inner join using the IN-DB Join tool, and then add an In-DB filter to choose dates greater than one date and less than another. This pulls all transactions first and filters second, but is fast since it's In-DB. Remember that if you choose the Inner Join option you'll also exclude the members that have no transactions, or that fail to join for some reason.


Also, remember that if the data type of the joining field differs in the two tables you will need to cast one so the data types match.