0
0
Snowflakecloud~10 mins

SELECT with Snowflake functions - Interactive Code Practice

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

Complete the code to select all columns from the table named 'employees'.

Snowflake
SELECT [1] FROM employees;
Drag options to blanks, or click blank then click option'
AEVERYTHING
BALL
CCOLUMNS
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using keywords like ALL or COLUMNS which are not valid for selecting all columns.
2fill in blank
medium

Complete the code to get the current date using a Snowflake function.

Snowflake
SELECT [1]();
Drag options to blanks, or click blank then click option'
ANOW
BCURRENT_DATE
CGETDATE
DTODAY
Attempts:
3 left
💡 Hint
Common Mistakes
Using NOW() which returns date and time, not just date.
3fill in blank
hard

Fix the error in the code to convert a string '2024-06-01' to a date type.

Snowflake
SELECT TO_DATE([1], 'YYYY-MM-DD');
Drag options to blanks, or click blank then click option'
A2024/06/01
B'2024/06/01'
C'2024-06-01'
D2024-06-01
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the date string or using slashes instead of dashes.
4fill in blank
hard

Fill both blanks to select the first 5 rows ordered by salary descending.

Snowflake
SELECT * FROM employees ORDER BY salary [1] LIMIT [2];
Drag options to blanks, or click blank then click option'
ADESC
BASC
C5
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using ASC instead of DESC, or wrong limit number.
5fill in blank
hard

Fill all three blanks to select employee names in uppercase where salary is greater than 50000.

Snowflake
SELECT [1](name) FROM employees WHERE salary [2] [3];
Drag options to blanks, or click blank then click option'
AUPPER
B>
C50000
DLOWER
Attempts:
3 left
💡 Hint
Common Mistakes
Using LOWER instead of UPPER, or wrong comparison operator.