Motivating member marketing
As part of a new effort to motivate gym members to come back, the marketing team is interested in creating notifications to share with members after a workout. Your job is to automate the creation of these messages so it can be quickly integrated into their app.
The message should look something like this: On <date> you burned <calories burned> calories via <workout type>.
Den här övningen är en del av kursen
Data Types and Functions in Snowflake
Övningsinstruktioner
- Use the appropriate function to join several text values together into a single message.
- Add the
calories_burnedfrom thevisitstable to the message. - Include the
workout_typethe member performed during their visit to the message, then alias the result asmessage.
Interaktiv övning med praktiskt arbete
Testa den här övningen genom att slutföra den här exempelkoden.
SELECT
v.user_id,
g.location,
-- Concatenate the following strings to create a sentence
___(
'Congrats! On ',
DATE(v.checkin_time),
' you burned ',
v.___, -- Add the calories burned
' calories via ',
v.___ -- Add the workout type
) AS message
FROM CORE_GYM.visits AS v
JOIN CORE_GYM.gyms AS g
ON v.gym_id = g.gym_id;