Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 4 Β· Quiz
"Functions on Columns and Date Ranges"
1. What is the correct SQL pattern to filter orders by a date range for a report?
WHERE OrderDate BETWEEN @Start AND @End
WHERE OrderDate >= @Start AND OrderDate <= @End
WHERE OrderDate >= @Start AND OrderDate < @EndExclusive
WHERE OrderDate > @Start AND OrderDate < @End
2. Why should `BETWEEN` not be used on a datetime column?
It is more readable than other options
It can lead to silently missing data
It is not a valid SQL operator
It is slower than other methods
3. What is the benefit of using a persisted computed column for filtering on a calculated value like 'YEAR(OrderDate)'?
It reduces storage space
It allows the query to be SARGable
It increases the speed of inserts
It eliminates the need for indexes
4. How should date literals be formatted to ensure clarity and prevent misinterpretation?
Use short date formats like '01/02/2026'
Use the ISO format 'YYYY-MM-DD' or 'YYYYMMDD'
Use numeric formats only
Use relative formats like 'today' or 'this month'
Submit answers
Continue: "Implicit Conversion: The .NET One" β
Review this lesson
Retake quiz