1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation in Snowflake

Connected

Exercise

Determining buyer intent

You've determined that a few things go into a customer buying a song. These include things like the genre and length of a song, as well as its price. Now, you're going to translate these into actionable data by writing a query to measure buyer intent.

Instructions

100 XP
  • Create a CASE statement; if songs have a unit_price of 0.99 and are either Rock and Roll or Pop (genre 5 and 9), classify as 'High' buyer intent.
  • If a song is shorter than 5 minutes (300000 milliseconds) and isn't Electronic Dance Music (genre 15), it should have 'Neutral' buyer intent.
  • All other songs should have 'Low' buyer intent.
Powered by Snowflake