Discussion board where members can get started with Qlik Sense.
i have a table
SQL SELECT `dbid`,
Here i have to join some tables to dbid when comm_id is greater than one, If comm_id is one for single dbid then i have to join some others tables to particularly for single comm_id.
Table1: which have multiple comm_id
Table2: which have single comm_id
How could i do this?
Might this help.
(html, codepage is 1252, embedded labels, table is @1);
count(comm_id) as Cnt
group by comm_id;
Cnt as Cnt1
Cnt as Cnt2
Drop table Cnt;
count(comm_id) as count_comm_id
Resident table group by comm_id;
load dbid as t1_dbid,
comm_id as t1_comm_id,
db_name as t1_db_name,
count_comm_id as t1_count_comm_id
Resident budget where count_comm_id>1;
load dbid as t2_dbid,
comm_id as t2_comm_id,
db_name as t2_db_name,
count_comm_id as t2_count_comm_id
Resident budget where count_comm_id<=1;
GROUP BY dbid;
WHERE APPLYMAP('map_aggr_comm_id', dbid) > 1;
WHERE APPLYMAP('map_aggr_comm_id', dbid) = 1;