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

How long were you at the gym?

Let's say that you're interested in how long each member was at the gym for. This would help to give you and the other teams consuming data from Snowflake the ability to understand things like workout efficiency. To do this, you'll have to use one of Snowflake's powerful date functions - good luck!

Bu egzersiz

Data Types and Functions in Snowflake

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

Egzersiz talimatları

  • In the SELECT statement, retrieve the user_id field, as well as the check in/out columns.
  • Use a Snowflake function to find the difference between the checkin_time and checkout_time, making sure the value returned is in minutes.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

SELECT
	
    -- Retrieve the user_id, as well as check in/out times
    ___,
    ___,
    ___,
	
    -- Find the number of minutes each member was at the gym for
    ___(___, ___, ___) AS workout_duration

FROM CORE_GYM.visits;
Kodu Düzenle ve Çalıştır