0
0
Snowflakecloud~10 mins

Data types in Snowflake - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a table with a column that stores whole numbers.

Snowflake
CREATE TABLE employees (id [1]);
Drag options to blanks, or click blank then click option'
ADATE
BVARCHAR
CBOOLEAN
DINTEGER
Attempts:
3 left
💡 Hint
Common Mistakes
Using VARCHAR for numbers causes errors when performing math.
BOOLEAN is for true/false values, not numbers.
2fill in blank
medium

Complete the code to define a column that stores text data.

Snowflake
CREATE TABLE products (name [1]);
Drag options to blanks, or click blank then click option'
AVARCHAR
BINTEGER
CFLOAT
DBOOLEAN
Attempts:
3 left
💡 Hint
Common Mistakes
Using INTEGER for text causes errors.
FLOAT is for decimal numbers, not text.
3fill in blank
hard

Fix the error in the code to store true/false values correctly.

Snowflake
CREATE TABLE settings (is_active [1]);
Drag options to blanks, or click blank then click option'
AINTEGER
BVARCHAR
CBOOLEAN
DDATE
Attempts:
3 left
💡 Hint
Common Mistakes
Using VARCHAR stores text 'true' or 'false' but not boolean values.
INTEGER cannot represent true/false directly.
4fill in blank
hard

Fill both blanks to create a table with a date and a decimal number column.

Snowflake
CREATE TABLE sales (sale_date [1], amount [2]);
Drag options to blanks, or click blank then click option'
ADATE
BFLOAT
CBOOLEAN
DVARCHAR
Attempts:
3 left
💡 Hint
Common Mistakes
Using VARCHAR for dates or numbers causes errors.
BOOLEAN is not suitable for dates or decimal numbers.
5fill in blank
hard

Fill all three blanks to create a table with an integer, text, and boolean column.

Snowflake
CREATE TABLE users (user_id [1], username [2], is_verified [3]);
Drag options to blanks, or click blank then click option'
AVARCHAR
BBOOLEAN
CINTEGER
DDATE
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up data types causes errors or wrong data storage.
Using DATE for username or boolean fields is incorrect.