diff --git a/sql-queries-5/String Concatenation and Aggregation in SQL/concatenating multiple rows.sql b/sql-queries-5/String Concatenation and Aggregation in SQL/concatenating multiple rows.sql new file mode 100644 index 00000000..884289d2 --- /dev/null +++ b/sql-queries-5/String Concatenation and Aggregation in SQL/concatenating multiple rows.sql @@ -0,0 +1 @@ +USE University; SELECT department_id, STRING_AGG(CASE WHEN is_active = 'yes' THEN name ELSE NULL END, ', ') AS active_courses FROM Course GROUP BY department_id;