How many Sundays are there in a given month? (Using SQL Server - without using a date table)

preview_player
Показать описание
There are either 4 or 5 Sundays in a month - information you might need to calculate an average. But how many are there?
My SQL Server Udemy courses are:
----
In this video, we'll calculate using a formula the number of Sundays in a particular month - and show the disadvantages to not using a date table.

The formula that I'll be using is as follows (replace the three "greater" with a greater than sign):

DECLARE @myDate date = '2025-03-05'
DECLARE @myDayRequired varchar(10) = 'Sunday'

Рекомендации по теме
Комментарии
Автор

Great content 👍🏻 Thanks for sharing
Looking forward to more such videos

vaishnavdahake
join shbcf.ru