LoslegenKostenlos loslegen

Optimizing charging scheduling

Lucky for you, you've become the go-to Snowflake user for answering day-to-day questions about each charging station. Your operations team is interested in ranking each charge based on the duration, for each charging station. This will help them optimize scheduling blocks for their new app. Time to get to it!

Diese Übung ist Teil des Kurses

Window Functions in Snowflake

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

SELECT
    charger_type,
    charging_duration * 60 AS charging_minutes,
	
    -- Assign a ranking to reach record based on charging
    -- duration, from shortest to longest
    ___() ___(
      	-- Segment the result set by charger type
        ___ ___ ___
        ORDER BY ___
    ) AS ___

FROM ELECTRIC_VEHICLES.charging;
Code bearbeiten und ausführen