select max(f.code ||' '|| f.name) as DisplayName, count(PD.id), sum(pd.amount) as amount from posdocuments pd join firms F on F.id=pd.firm_id where PD.posshift_id=:POSShift_ID and PD.opened='N' group by PD.firm_id, f.code, f.name order by f.code, f.name
Generated by ABRA Software a.s. 27.10.2021 16:34:30