เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

When did you check in?

Not only can you convert strings to datetime values, you can also manipulate these values themselves. Your manager has tasked you with further breaking down the date and time that gym members visit a certain location. Time to get to it!

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Data Types and Functions in Snowflake

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Update this query to cast the checkin_time column to a DATE stored in a column called the_date.
  • Add a final line to the SELECT statement to cast checkin_time to a TIME data type and alias the resulting column as the_time.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

SELECT
    checkin_time,
    
    -- Cast checkin_time to DATE
    ___::___ AS the_date,
    
    -- Cast checkin_time to TIME
    ___::___ AS the_time

    
FROM CORE_GYM.visits
;
แก้ไขและรันโค้ด