BaşlayınÜcretsiz Başlayın

Engaging vehicle owners with metrics

To better engage vehicle owners, the marketing team is currently using two tables to send a post-charge message comparing that user's session to their vehicle model's average. They'd like to streamline this process, so they've come to you. Time to show them what you're made of!

Bu egzersiz

Window Functions in Snowflake

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

SELECT
    user_id,
    vehicle_model,
    energy_consumed,
    charging_duration,
	
    -- Count the total number of charging sessions by vehicle_model
    ___(*) OVER(
        PARTITION BY ___
    ) AS total_number_of_charges
    
FROM ELECTRIC_VEHICLES.charging
ORDER BY vehicle_model;
Kodu Düzenle ve Çalıştır