Skip to content

Commit

Permalink
loading only occurrence download counts when explicitly asked for it
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-lg committed Jul 25, 2023
1 parent b792e9b commit f2be771
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@
SELECT COUNT(*) FROM dataset_occurrence_download WHERE download_key = #{key,jdbcType=VARCHAR}
</select>

<select id="COUNT_ORGANIZATIONS" resultType="Integer">
<select id="COUNT_ORGANIZATIONS" resultType="Long">
SELECT COUNT(DISTINCT o.key)
FROM dataset_occurrence_download dod
INNER JOIN dataset d ON dod.dataset_key= d.key
INNER JOIN organization o ON d.publishing_organization_key = o.key
WHERE dod.download_key = #{key,jdbcType=VARCHAR}
</select>

<select id="COUNT_PUBLISHING_COUNTRIES" resultType="Integer">
<select id="COUNT_PUBLISHING_COUNTRIES" resultType="Long">
SELECT COUNT(DISTINCT o.country)
FROM dataset_occurrence_download dod
INNER JOIN dataset d ON dod.dataset_key= d.key
Expand Down

0 comments on commit f2be771

Please sign in to comment.