LoslegenKostenlos starten

Adjusting membership prices

The business development team is mulling a change to their membership prices. They've come to you with the ask to build out a handful of different options and provide the results. In this example, you'll be doing exactly that!

Diese Übung ist Teil des Kurses

<Kurs>Data Types and Functions in Snowflake</Kurs>
Kurs ansehen

Übungsanweisungen

  • Update the SELECT statement to include a new field that adds a 25% uplift on the existing price_per_month.
  • Create a new column called plus_five_dollars that adds $5.00 to the price_per_month in the sp table.
  • Create another new column which divides the price_per_month by 2 - call this column half_off.

Interaktive praktische Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

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;
Code bearbeiten und ausführen