File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -557,6 +557,20 @@ objects:
557557 JOIN rh_account a ON a.id = sp.rh_account_id
558558 LEFT JOIN template t on t.id = sp.template_id
559559 ORDER BY a.org_id, sp.inventory_id;
560+ queries :
561+ - prefix : hms_analytics/content-sources/system-template-grouped
562+ chunksize : ${{FLOORIST_HMS_CHUNKSIZE}}
563+ query : >-
564+ SELECT a.org_id,
565+ count(ih.id),
566+ t.uuid::text as template_uuid, t.environment_id, t.name as template_name
567+ FROM system_platform sp
568+ JOIN inventory.hosts ih ON sp.inventory_id = ih.id
569+ JOIN rh_account a ON a.id = sp.rh_account_id
570+ LEFT JOIN template t on t.id = sp.template_id
571+ where sp.last_upload >= date_trunc('month', CURRENT_DATE)
572+ group by a.org_id, template_uuid, t.environment_id, template_name
573+ ORDER BY a.org_id;
560574
561575
562576 - apiVersion : v1
You can’t perform that action at this time.
0 commit comments