SLOs
Ordering Results & Calculating Values
Week 04: April 6β10ΒΆ
At the end of this week, you should be able to:
Sort query results by multiple columns using
ORDER BY.Explain how
NULLvalues behave in sorted results.Describe how data types affect sort order.
Limit and paginate results using
LIMITandOFFSET.Write calculated columns in a
SELECTclause using arithmetic and expressions.Handle
NULLvalues in calculations using functions likeCOALESCEandNULLIF.Apply arithmetic operators (
+,-,*,/,%) inside queries.Use numeric functions such as
ROUND,FLOOR, andCEILto transform values.Use datetime functions to extract and manipulate date and time data.
Use string functions such as
UPPER,TRIM, andSUBSTRto transform text.Write a basic subquery nested inside a
SELECTorWHEREclause.Use a
CASEexpression to return conditional values within a query.Convert between data types using
CAST.Create a reusable
VIEWusingCREATE VIEW.