The movie lens data have denormalized genres:
movie1 ACTION|ADVENTURE
movie2 ACTION|ADVENTURE|DRAMA
...
Is it possible to write a simple SQL to get the normalized movie-genres:
movie1 ACTION
movie1 ADVENTURE
movie2 ACTION
...
Suppose I'm doing this in MySQL or PostgreSQL.
For
PostgreSQL
, you can useunnest
withstring_to_array
: