You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
json_agg(json_build_object('key', concept_node_meta.key, 'value', concept_node_meta.value)) AS metadata
249
+
FROM
250
+
concept_node_meta
251
+
WHERE
252
+
concept_node_meta.concept_node_id IN (
253
+
SELECT concept_node_id FROM filtered_concepts
254
+
)
255
+
GROUP BY
256
+
concept_node_meta.concept_node_id
257
+
)
258
+
SELECT
259
+
concept_node.*,
260
+
ds.REF as dataset,
261
+
ds.abbreviation AS studyAcronym,
262
+
continuous_min.VALUE as min, continuous_max.VALUE as max,
263
+
categorical_values.VALUE as values,
264
+
allow_filtering.allowFiltering AS allowFiltering,
265
+
meta_description.VALUE AS description,
266
+
aggregated_meta.metadata AS metadata
267
+
FROM
268
+
filtered_concepts as concept_node
269
+
LEFT JOIN dataset AS ds ON concept_node.dataset_id = ds.dataset_id
270
+
LEFT JOIN concept_node_meta AS meta_description ON concept_node.concept_node_id = meta_description.concept_node_id AND meta_description.KEY = 'description'
271
+
LEFT JOIN concept_node_meta AS continuous_min ON concept_node.concept_node_id = continuous_min.concept_node_id AND continuous_min.KEY = 'min'
272
+
LEFT JOIN concept_node_meta AS continuous_max ON concept_node.concept_node_id = continuous_max.concept_node_id AND continuous_max.KEY = 'max'
273
+
LEFT JOIN concept_node_meta AS categorical_values ON concept_node.concept_node_id = categorical_values.concept_node_id AND categorical_values.KEY = 'values'
274
+
LEFT JOIN allow_filtering ON concept_node.concept_node_id = allow_filtering.concept_node_id
275
+
LEFT JOIN aggregated_meta ON concept_node.concept_node_id = aggregated_meta.concept_node_id
0 commit comments