@@ -15,23 +15,16 @@ CREATE OR REPLACE VIEW project_list_view AS WITH project_person_list_lookup AS (
1515funding_sources_lookup AS (
1616 SELECT
1717 mpf .project_id ,
18- string_agg(
19- DISTINCT mfs .funding_source_name , ' , ' ::text
20- ORDER BY mfs .funding_source_name
21- ) AS funding_source_name,
22- string_agg(
23- DISTINCT mfp .funding_program_name , ' , ' ::text
24- ORDER BY mfp .funding_program_name
25- ) AS funding_program_names,
18+ string_agg(DISTINCT mfs .funding_source_name , ' , ' ::text ORDER BY mfs .funding_source_name ) AS funding_source_name,
19+ string_agg(DISTINCT mfp .funding_program_name , ' , ' ::text ORDER BY mfp .funding_program_name ) AS funding_program_names,
2620 string_agg(
2721 DISTINCT
2822 CASE
2923 WHEN mfs .funding_source_name IS NOT null AND mfp .funding_program_name IS NOT null THEN concat(mfs .funding_source_name , ' - ' , mfp .funding_program_name )
3024 WHEN mfs .funding_source_name IS NOT null THEN mfs .funding_source_name
3125 WHEN mfp .funding_program_name IS NOT null THEN mfp .funding_program_name
3226 ELSE null ::text
33- END, ' , ' ::text
34- ORDER BY (
27+ END, ' , ' ::text ORDER BY (
3528 CASE
3629 WHEN mfs .funding_source_name IS NOT null AND mfp .funding_program_name IS NOT null THEN concat(mfs .funding_source_name , ' - ' , mfp .funding_program_name )
3730 WHEN mfs .funding_source_name IS NOT null THEN mfs .funding_source_name
@@ -168,10 +161,7 @@ min_estimated_phase_dates AS (
168161project_component_work_types AS (
169162 SELECT
170163 mpc .project_id ,
171- string_agg(
172- DISTINCT mwt .name , ' , ' ::text
173- ORDER BY mwt .name
174- ) AS component_work_type_names
164+ string_agg(DISTINCT mwt .name , ' , ' ::text ORDER BY mwt .name ) AS component_work_type_names
175165 FROM moped_proj_components mpc
176166 LEFT JOIN moped_proj_component_work_types mpcwt ON mpc .project_component_id = mpcwt .project_component_id
177167 LEFT JOIN moped_work_types mwt ON mpcwt .work_type_id = mwt .id
0 commit comments