Skip to content

Commit

Permalink
fix: use rpc mentions_by_software software mentions counts
Browse files Browse the repository at this point in the history
  • Loading branch information
dmijatovic committed Oct 24, 2024
1 parent 851b8c7 commit c07ca2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion database/100-create-api-views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ $$;
-- TOTAL COUNTS FOR HOMEPAGE
-- software_cnt, project_cnt, organisation_cnt
-- this rpc returns json object instead of array
-- DEPENDS on RPC mentions_by_software (104-software-views.sql)
CREATE FUNCTION homepage_counts(
OUT software_cnt BIGINT,
OUT open_software_cnt BIGINT,
Expand All @@ -770,7 +771,7 @@ BEGIN
organisations_overview.parent IS NULL AND organisations_overview.score>0
INTO organisation_cnt;
SELECT COUNT(DISTINCT(orcid,given_names,family_names)) FROM contributor INTO contributor_cnt;
SELECT COUNT(mention) FROM mention_for_software INTO software_mention_cnt;
SELECT count(DISTINCT(id)) FROM mentions_by_software() INTO software_mention_cnt;
END
$$;

Expand Down

0 comments on commit c07ca2d

Please sign in to comment.