Skip to content

Commit

Permalink
BugFix: Method Attributes SQL (#1462)
Browse files Browse the repository at this point in the history
- fix sql
  • Loading branch information
mauberti-bc authored Jan 16, 2025
1 parent 00711d6 commit 7344aa4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/src/repositories/standards-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,18 @@ export class StandardsRepository extends BaseRepository {
taq.description AS qual_description,
COALESCE(json_agg(
json_build_object(
'name', mlaqo.name,
'description', mlaqo.description
) ORDER BY mlaqo.name
'name', taqo.name,
'description', taqo.description
) ORDER BY taqo.name
), '[]'::json) AS options
FROM
method_lookup_attribute_qualitative_option mlaqo
LEFT JOIN
method_lookup_attribute_qualitative mlaq ON mlaqo.method_lookup_attribute_qualitative_id = mlaq.method_lookup_attribute_qualitative_id
LEFT JOIN
technique_attribute_qualitative taq ON mlaq.technique_attribute_qualitative_id = taq.technique_attribute_qualitative_id
LEFT JOIN
technique_attribute_qualitative_option taqo ON taqo.technique_attribute_qualitative_option_id = mlaqo.technique_attribute_qualitative_option_id
GROUP BY
mlaq.method_lookup_id,
taq.name,
Expand Down

0 comments on commit 7344aa4

Please sign in to comment.