MulaiMulai sekarang secara gratis

Experimenting with compatible types

As we covered in the slides, some data types are compatible with others, meaning they will implicitly convert to the proper type when used in an assignment or comparison clause. For example, if you compare an INTEGER and a VARCHAR, it will convert the INTEGER into a VARCHAR for the comparison.

Latihan ini adalah bagian dari kursus

Introduction to Redshift

Lihat Kursus

Petunjuk latihan

  • Select year_qtr, total_sales, percent_ecom, and finally percent_change_year_ecom from spectrumdb.ecommerce_sales.
  • Find where percent_change_year_ecom is greater than 50 as a string.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

-- Select year_qtr, total_sales, percent_ecom, percent_change_year_ecom
SELECT year_qtr, 
       ___, 
       percent_ecom, 
       ___ 
  FROM spectrumdb.ecommerce_sales 
-- Find where percent_change_year_ecom is greater than 50
 WHERE ___ > ___;
Edit dan Jalankan Kode