community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Nested Query with parameters

Atom

Hi,

 

I have a query that I would like to automate through Alteryx.

 

Query1: Select col1, col2 from ABC WHERE Parameter1="afsdfsdg"

 

Query2: Select Query1.Col2, EFG.Col3, EFG.Col4, Count(Distinct EFG.Col5) Where EFG INNER JOIN Query1 On EFG.Col4=Col1

WHERE EFG.Parameter 2="afsasdfg"

Group By Query1.Col2, EFG.Col3, EFG.Col4

 

Please note that metric in Query 2 is a Count Distinct and also it brings a column from Query1. Because of these two reasons I am unable to separate the query and compute the data separately as two Input data components. Also Query 2 is running on huge database tables. Doing Count distinct at the later stage might have huge performance implication.

 

I want to use drop down parameters to automate this thing.

 

Any help will be appreciated!!

 

Thx,

Brojeshwar

 

 

 

Alteryx Certified Partner
Alteryx Certified Partner

Hi @bghosh

Maybe you want to start looking deeper into the Dynamic Input In-DB Tool (https://help.alteryx.com/11.0/index.htm#cshid=LockInDynamicInput.htm)

 

Hope this points into the right direction.

Best,

_AG_

Labels