Session Ready
Exercise

Querying the recommendations

In the previous exercises, you've learned how to calculate a table with course recommendations on a daily basis. Now that this recommendations table is in the data warehouse, you could also quickly join it with other tables in order to produce important features for DataCamp students such as customized marketing emails, intelligent recommendations for students and other features.

In this exercise, you will get a taste of how the newly created recommendations table could be utilized by creating a function recommendations_for_user() which automatically gets the top recommended courses based per user ID for a particular rating threshold.

Instructions
100 XP
  • Complete the query in the recommendations_for_user() function definition. It should join the courses table.
  • Complete the read_sql() function in recommendations_for_user(). The params argument is incomplete.
  • Observe the results of the recommendations_for_user() function you defined in the last statements.