开始使用免费开始使用

调整会员价格

业务拓展团队正在考虑调整会员价格。他们希望您构建几种不同的定价方案并给出结果。在这个练习中,您将完成这一任务。

本练习是课程的一部分

Snowflake 中的数据类型与函数

查看课程

练习说明

  • 更新 SELECT 语句,新增一个字段,在当前 price_per_month 基础上增加 25% 的涨幅。
  • sp 表中创建名为 plus_five_dollars 的新列,为 price_per_month 增加 $5.00
  • 再创建一个新列,将 price_per_month 除以 2,并将该列命名为 half_off

交互式实操练习

通过完成这段示例代码来试试这个练习。

SELECT
    m.user_id,
    m.sign_up_date,
    m.subscription_plan,
    sp.price_per_month AS original_price,

	-- Add a 25% uplift to the existing price per month
    ___ * 1.25 AS twenty_five_percent_uplist,
    
    -- Increase the price_per_month by $5.00 
    ___ ___ ___ AS ___, 
    
    -- Divide the price per month by 2
    ___

FROM CORE_GYM.subscription_plans AS sp
JOIN CORE_GYM.members AS m
    ON sp.subscription_plan = m.subscription_plan;
编辑并运行代码