
این گزارش با استفاده از اطلاعات نسخ ارائه شده استخراج شده است و به تفکیک ماه، استان و شریک کاری، عملکرد شرکت های نرم افزاری را نمایش می دهد.
select
(select name from PARTNERCARE.vpncgeoinfo where province_id=t.province_id and recordtype=1 and year=93) as provincename
,terminal_id
,(select worksite from samid.tiumumuser where id=terminal_id) as terminalName
,partnername
,partnertype
,deliveredMonth
,count(1) as deliveredPrescriptionCount
from (
select
g.province_id
,terminal_id
,p.partnername
,pt.name as partnertype
,to_char(pkgiutil.fncepochtodate(delivereddate),'yyyymm','nls_calendar=persian') as deliveredMonth
from thdkdeliveredprescription dpre,PARTNERCARE.tpncpartner p,PARTNERCARE.tpncpartnertype pt,PARTNERCARE.tpncaddress a,PARTNERCARE.vpncgeoinfo g
where dpre.partner_id=p.id
and p.type_id=pt.id
and p.address_id=a.id
and a.geo_id=g.id
and to_char(pkgiutil.fncepochtodate(delivereddate),'yyyy','nls_calendar=persian')='1399'
)t
group by province_id,terminal_id,partnername,partnertype,deliveredMonth;