IniziaInizia gratis

Aggregating strings

You are planning to update your storefront window to demonstrate how family-friendly and multi-lingual your DVD collection is. To prepare for this you need to prepare a comma-separated list G-rated film titles by language released in 2010.

Questo esercizio fa parte del corso

Applying SQL to Real-World Problems

Visualizza il corso

Istruzioni dell'esercizio

  • Return a column with a list of comma-separated film titles by using the STRING_AGG() function.
  • Limit the results to films that have a release_year of 2010 AND have a rating of 'G'.
  • Ensure that the operation is grouped by the language name.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

SELECT name, 
	___ AS film_titles
FROM film AS f
INNER JOIN language AS l
  ON f.language_id = l.language_id
WHERE ___
  AND ___
GROUP BY ___;
Modifica ed esegui il codice