Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
kiranb13
New Contributor II

Data model for two sub queries in Qlikview

Hi team,

I have 3 tables 

T_WEB_APP_TST_PROJ, T_WEB_APP_TST_SB_PROJ  and T_WEB_APP_PROJ_BUS_CNCRN.

Can anyone help me to build a data model based on the below query on a high level ?

I cannot join T_WEB_APP_TST_PROJ and T_WEB_APP_TST_SB_PROJ . Using T_WEB_APP_PROJ_BUS_CNCRN i have to join above two columns.

select * from (
select MAIN_PROJ_ID as PROJ_ID, MAIN_PROJ_ID ,'BUyyer' as TyPEofRecord
from T_WEB_APP_TST_PROJ MP
union
select sb_proj_id as PROJ_ID, main_proj_id, 'supplier' as TyPEofRecord from T_WEB_APP_TST_SB_PROJ SP
inner join (Select TST_PROJ_ID, SB_TST_PROJ_ID from T_WEB_APP_PROJ_BUS_CNCRN group by TST_PROJ_ID, SB_TST_PROJ_ID)
as Map on SP.TST_SB_PROJ_SEQ_ID=Map.SB_TST_PROJ_ID
inner join T_WEB_APP_TST_PROJ as MP ON MP.TST_PROJ_SEQ_ID=Map.TST_PROJ_ID ) KF