Calculating Years Since Review
3.2 · Challenge

Calculating Years Since Review

Write a query to calculate the average number of years between the release of a movie and when it was reviewed.

  • Retrieve all movies reviewed by Angela Thompson.
  • Use datetime({epochseconds:r.timestamp}) for the datetime for when the movie was reviewed.
  • Use date(m.released) for the date when the movie was released.
  • Use duration.between() the two dates to create the duration.
  • Collect and REWIND to create the sum.