what does this SQL do:


SELECT 
	t1."STATE" AS "STATE",
	COUNT(t2."DEAL_ID") AS "COUNT_DEALS",
	SUM(t2."AMOUNT") AS "SUM_AMOUNT",
	MAX(t1."CREATED_AT") AS "MAX_CREATED_AT"
FROM
	"DEMO_DATA"."DBT_HUBSPOT"."HUBSPOT__COMPANIES" t1
INNER JOIN
	"DEMO_DATA"."DBT_STG_HUBSPOT"."STG_HUBSPOT__DEAL_COMPANY" t3
ON
	t1."COMPANY_ID" = t3."COMPANY_ID"
INNER JOIN
	"DEMO_DATA"."DBT_HUBSPOT"."HUBSPOT__DEALS" t2
ON
	t3."DEAL_ID" = t2."DEAL_ID"
WHERE
	t1."STATE" IS NOT NULL
GROUP BY
	1
