0
0
Snowflakecloud~5 mins

SELECT with Snowflake functions - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the SELECT statement do in Snowflake?
The SELECT statement retrieves data from one or more tables or views in Snowflake. It allows you to specify which columns to show and can include functions to transform or calculate data.
Click to reveal answer
beginner
How do you use the CURRENT_DATE() function in a SELECT statement?
You can use CURRENT_DATE() to get today's date. For example: <br>SELECT CURRENT_DATE; returns the current date in the session's time zone.
Click to reveal answer
beginner
What is the purpose of the UPPER() function in Snowflake SELECT queries?
UPPER() converts all letters in a string to uppercase. For example: <br>SELECT UPPER('hello'); returns 'HELLO'.
Click to reveal answer
intermediate
Explain how the DATEADD() function works in Snowflake.
DATEADD() adds a specified amount of time to a date or timestamp. For example: <br>SELECT DATEADD(day, 5, CURRENT_DATE()); adds 5 days to today’s date.
Click to reveal answer
intermediate
What does the COALESCE() function do in a SELECT statement?
COALESCE() returns the first non-null value from a list of expressions. It helps handle missing data by providing a fallback value.
Click to reveal answer
Which function returns the current timestamp in Snowflake?
ACURRENT_TIMESTAMP()
BNOW()
CGETDATE()
DTODAY()
What does this query return? <br>SELECT LENGTH('Snowflake');
AThe number of characters in 'Snowflake'
BThe word 'Snowflake'
CAn error
DThe position of 'f' in 'Snowflake'
How do you add 10 days to the current date in Snowflake?
ADATE_PLUS(CURRENT_DATE(), 10)
BADD_DAYS(CURRENT_DATE(), 10)
CDATEADD(day, 10, CURRENT_DATE())
DCURRENT_DATE() + 10
Which function converts a string to lowercase in Snowflake?
AMINUSCULE()
BDOWNCASE()
CTOLOWER()
DLOWER()
What will COALESCE(NULL, 'Snowflake', 'Cloud') return?
ANULL
B'Snowflake'
C'Cloud'
DAn error
Describe how to use SELECT with functions in Snowflake to manipulate data.
Think about how you can change or calculate data directly in your SELECT statement.
You got /3 concepts.
    Explain how Snowflake handles null values in SELECT queries using functions.
    Consider how to provide fallback values when data is missing.
    You got /3 concepts.