मेंबरशिप प्राइस समायोजित करना
बिज़नेस डेवलपमेंट टीम अपने मेंबरशिप प्राइस में बदलाव पर विचार कर रही है. वे आपसे कुछ अलग-अलग विकल्प तैयार करने और उनके परिणाम साझा करने का अनुरोध लेकर आए हैं. इस उदाहरण में, आप बिल्कुल वही करेंगे!
यह अभ्यास पाठ्यक्रम का हिस्सा है
Snowflake में Data Types और Functions
अभ्यास निर्देश
SELECTस्टेटमेंट को अपडेट करें ताकि एक नया फ़ील्ड शामिल हो जो मौजूदाprice_per_monthपर 25% की वृद्धि जोड़ता हो.spटेबल मेंprice_per_monthमें$5.00जोड़करplus_five_dollarsनाम का एक नया कॉलम बनाएँ.- एक और नया कॉलम बनाएँ जो
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;