5  Market Segments

Market segments are defined by STATFOR for the whole Agency and documentation explaining their rules and definitions can be found here.

Below are the relevant tables to retrieve the information:

Example query to apply the function for d-1.

SELECT  flt_uid, 
        TRUNC (flt_a_asp_prof_time_entry) as entry_date,
        SWH_FCT.SWH_DIM_FCT.GET_FLIGHT_TYPE_RULE_SMC (flt_LOBT,
                  nvl(AO_ICAO_ID,'ZZZ'),
                  flt_acft_id,flttyp,
                  ICAO_ACFT_TY_ID,
                  flt_dep_ad,
                  flt_ctfm_ades,NVL(FLT_REG_MARKING,'ZZZ')) SK_FLT_TYPE_RULE_ID
FROM aru_flt.flt a 
WHERE flt_lobt >= trunc(sysdate) -1-1   
AND flt_lobt< trunc(sysdate) 
AND  (A.flt_a_asp_prof_time_entry) >=  trunc(sysdate) -1  
AND trunc(A.flt_a_asp_prof_time_entry) < trunc(sysdate) 
AND a.flt_state IN ('TE', 'TA', 'AA')