SELECT DISTINCT T1."document_type" AS "Document Type",
	T1."nominal_account_number" AS "Nominal Account Number",
	T1."customer_contra_account" AS "Customer Contra Account",
	T1."invoice_number" AS "Invoice Number",
	T1."skr51_branch" AS "Skr51 Branch",
	'1' AS "Rechtseinheit",
	'0' + (((T1."skr51_branch"))) AS "Betrieb",
	'1' AS "Mandant",
	'1' AS "Hauptbetrieb",
	('0' + (((T1."skr51_branch")))) AS "Standort"
FROM "journal_accountings" T1
WHERE (
		(
			(T1."nominal_account_number" IN (8520))
			AND (T1."document_type" = 'R')
			)
		AND (T1."invoice_date" >= convert(DATE, '2016-01-01'))
		)
	-- order by "Invoice Number" asc,"Nominal Account Number" asc
