Skip to content

Lista uprawnień

SQL
select ts.team_short grupa,
    ts.team_name,
    count(*) ilosc_faktur
from document.invoice iv
    INNER JOIN document.documentType dt ON dt.documentType = iv.invoiceCategory
    AND dt.componentName = 'saleinvoice'
    and dt.isproforma = 0
    INNER join [app].[teams] ts on iv.groupid = ts.team_id
where invoiceissuedate >= '2021-01-01'
    and status > 0
group by groupid,
    team_short,
    team_name