Skip to content

Commit

Permalink
Fix the bubbling counts to be arranged by parent, not child
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Betts committed Jun 29, 2023
1 parent 90a9a43 commit 3b814bf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DROP MATERIALIZED VIEW IF EXISTS report.group_bubbled_annotation_counts CASCADE;

CREATE MATERIALIZED VIEW report.group_bubbled_annotation_counts AS (
SELECT
group_id,
group_to_group.parent_id AS group_id,
created_week,
role,
sub_type,
Expand All @@ -16,6 +16,6 @@ CREATE MATERIALIZED VIEW report.group_bubbled_annotation_counts AS (
-- so the child_id here is all children and ourselves
JOIN report.group_annotation_counts ON
group_annotation_counts.group_id = group_to_group.child_id
GROUP BY group_id, created_week, role, sub_type, shared
ORDER BY group_id, created_week, count DESC
GROUP BY group_to_group.parent_id, created_week, role, sub_type, shared
ORDER BY group_to_group.parent_id, created_week, count DESC
) WITH NO DATA;

0 comments on commit 3b814bf

Please sign in to comment.