Szkoda pisać fakturę:
select
adr_nazwa [Kontrahent],
dok_DataWyst [Data wystawienia],
dok_NrPelny [Nr pełny],
dok_WartBrutto [Wartość brutto]
from dok__Dokument
left join adr__Ewid ON adr_TypAdresu=1 and adr_IdObiektu=dok_PlatnikId
where
dok_typ=2
and dok_DataWyst between {DR:Dokumenty z okresu:BIEZACY_MIESIAC}
and dok_PlatnikId in (
select ck_idkhnt from kh_CechaKh inner join sl_CechaKh on ck_idcecha=ckh_id and ckh_Nazwa='konsygnacja')
and dok_uwagi like '%Rozliczenie konsygnacji%'