НачатьНачать бесплатно

Follow the money!

Partitioning data in a window function is what makes these tools so unique! Now, you're being tasked with ranking charging sessions for each location based on the cost of the charge. This could help to identify which charging stations drive the most revenue and inform operational changes.

Это упражнение является частью курса

Window Functions in Snowflake

Посмотреть курс

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

SELECT
    user_id,
    charging_station_id,
    charging_cost,
    
    -- Create a window function to rank each session based on charging cost
    ___() ___(
        ___ ___ ___ DESC
    ) AS expensive_charges
    
FROM ELECTRIC_VEHICLES.charging;
Редактировать и запускать код