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