Skip to content

Commit 742de06

Browse files
committed
fix: show all language data for top languages graph query
1 parent 150c29c commit 742de06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: db-refresher/db_queries.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ SELECT coalesce(array_to_json(array_agg(row_to_json (t))),'[]') FROM ( select st
5353
SELECT coalesce(array_to_json(array_agg(row_to_json (t))),'[]') FROM ( SELECT distinct(language), type from contributions_and_demo_stats)t;
5454

5555
\o topLanguagesBySpeakerContributions.json
56-
SELECT coalesce(array_to_json(array_agg(row_to_json (t))),'[]') FROM ( select language, total_speakers, type from (select language, total_speakers, type, row_number() OVER ( PARTITION BY type ORDER BY total_speakers DESC ) rank from language_group_contributions) as language_data where rank < 6)t;
56+
SELECT coalesce(array_to_json(array_agg(row_to_json (t))),'[]') FROM ( select language, total_speakers, type from (select language, total_speakers, type, row_number() OVER ( PARTITION BY type ORDER BY total_speakers DESC ) rank from language_group_contributions) as language_data)t;
5757

5858
\o topLanguagesByHoursContributed.json
5959
SELECT coalesce(array_to_json(array_agg(row_to_json (t))),'[]') FROM ( select language, coalesce(total_contributions, 0) total_contributions, total_contribution_count, type from (select language,(total_contributions + total_validations) as total_contributions, (total_contribution_count + total_validation_count) as total_contribution_count, row_number() OVER ( PARTITION BY type ORDER BY (total_contributions + total_validations) DESC,
60-
(total_contribution_count + total_validation_count) DESC ) rank, type from language_group_contributions ) as language_data where rank < 6)t;
60+
(total_contribution_count + total_validation_count) DESC ) rank, type from language_group_contributions ) as language_data)t;
6161

6262
\o lastUpdatedAtQuery.json
6363
SELECT coalesce(array_to_json(array_agg(row_to_json (t))),'[]') FROM ( SELECT max(lastupdated) AT TIME ZONE 'Asia/Kolkata' from audit_load_log)t;

0 commit comments

Comments
 (0)