Get startedGet started for free

Creating and Calling a SQL UDF

Harbr's operations team wants a consistent way to label shipment performance across all regions - rather than repeating a CASE statement in every query, you'll package the logic into a reusable scalar UDF. Your task is to create a UDF that takes delivery_days as input and returns a performance tier label, then apply it against logistics.shipments to identify how many shipments fall into each tier.

This exercise is part of the course

Data Pipeline Automation in Snowflake

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise