Challenge: Custom Welcome Messages
Swipe to start coding
Write a query that generates a welcome_message column for each employee in the employees table. The welcome_message should be 'Welcome back, [name]!' if the employee's years_at_company is greater than 1, and 'Welcome, [name]!' otherwise. If the employee's name is NULL, use 'there' in place of the name.
- Use a
CASE WHENexpression to determine the correct greeting based onyears_at_company. - Use the employee's
namevalue in the message, or substitute'there'ifnameisNULL. - The resulting column should be named
welcome_message.
Solución
¡Gracias por tus comentarios!
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Genial!
Completion tasa mejorada a 4.17
Challenge: Custom Welcome Messages
Desliza para mostrar el menú
Swipe to start coding
Write a query that generates a welcome_message column for each employee in the employees table. The welcome_message should be 'Welcome back, [name]!' if the employee's years_at_company is greater than 1, and 'Welcome, [name]!' otherwise. If the employee's name is NULL, use 'there' in place of the name.
- Use a
CASE WHENexpression to determine the correct greeting based onyears_at_company. - Use the employee's
namevalue in the message, or substitute'there'ifnameisNULL. - The resulting column should be named
welcome_message.
Solución
¡Gracias por tus comentarios!
single