на spark scala select trunc(perioddt, 'MM') as transactioncd , subscribersk , sum(case…
- User
на spark scala select trunc(period_dt, 'MM') as transaction_cd , subscriber_sk , sum(case when b.rev_level_3_cd in ('MP_TC_285','MP_TC_286','MP_TC_287','MP_TC_288') then value_amt else 0 end) as fmc_fix_rev ---- other rev , sum(case when b.rev_level_3_cd in ('PRIN_00426') then value_amt else 0 end) as umcs_rev ---- umcs from beemetrics.dm_cat_mobile_traf_rev_daily a left join rdm.pub_bpcatalogue__mref_cat_mobile_hyp_revenue b on a.rev_traf_level_5_num = b.rev_level_5_num and a.period_dt between b.effective_from_dt and b.effective_to_dt where 1=1 and a.period_dt >= {tr_date}, 1) and actv_reason_cd not in ('LOPAY', 'LOEMP') and transaction_cd in ('FULL CHARGE', '-1') and source_type_cd = 'BASE'
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.