SQL Query | How to calculate Biweekly Friday dates in an Year | Date Functions

  Рет қаралды 7,327

Learn at Knowstar

Learn at Knowstar

Күн бұрын

Пікірлер: 16
@babytigtig3795
@babytigtig3795 6 ай бұрын
Thanks for the wonderful video. Please more Windows functions examples.
@theraizadatalks14
@theraizadatalks14 11 ай бұрын
It was a good question, thanks for explaining. Same question has been asked to me with a little twist in an interview.
@LearnatKnowstar
@LearnatKnowstar 10 ай бұрын
Glad it was helpful!
@kristyowens2284
@kristyowens2284 4 жыл бұрын
Great job. Thank you for your efforts.
@LearnatKnowstar
@LearnatKnowstar 4 жыл бұрын
Thank you
@hv0032113
@hv0032113 4 жыл бұрын
Amazing. Very helpful.
@LearnatKnowstar
@LearnatKnowstar 4 жыл бұрын
Thank you
@Beyondhorizons-i5z
@Beyondhorizons-i5z 4 жыл бұрын
Excellent explanation.
@LearnatKnowstar
@LearnatKnowstar 4 жыл бұрын
Thank you
@krishna6296
@krishna6296 2 жыл бұрын
Thank you for your efforts. Nicely explained!
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Glad it was helpful 🙏
@sivachaitanya6330
@sivachaitanya6330 Жыл бұрын
Another Method can be as follows-------------------- I created my date column using recursive CTE table--------- WITH recursive Date_Ranges AS ( select '2022-01-01' as Date union all select Date + interval 1 day from Date_Ranges where Date < '2022-12-31'), tab as( select *,dayofweek(Date) as daynum,dayname(Date) dayname ,case when dayofweek(Date)=6 then row_number() over(partition by dayofweek(Date) order by dayofweek(Date)) else 0 end as FridayNum from Date_Ranges order by Date) select * from tab where mod(FridayNum,2)0;
@anupamsharma4263
@anupamsharma4263 Жыл бұрын
[with r_cte as (select case when datepart(dw, '2023-01-01') > 6 then dateadd(day, 6 - datepart(dw, '2023-01-01') + 7, datepart(dw, '2023-01-01')) else dateadd(day, 6 - datepart(dw, '2023-01-01'), '2023-01-01') end as first_friday, 14 as days, 1 as factor from dual union all select dateadd(day, days*factor, first_friday), days, factor from r_cte where Year(dateadd(day, days*factor, first_friday)) = 2023) select * from r_cte];
@xst-k6
@xst-k6 Жыл бұрын
#feedback: 1. Please type the code before recording the video; don't waste the viewer's time by typing, focus on the lesson instead of typing and correcting mistakes 2. Comment the code 3. Enable line numbers 4. Store constants in variables with proper names to make the code more readable 5. Indent the code
@LearnatKnowstar
@LearnatKnowstar Жыл бұрын
Loved points 2 to 5
SQL tutorial | Date Functions | Difference between DATEDIFF and DATEADD
19:25
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 64 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 53 МЛН
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 7 МЛН
SQL Query | How to calculate YTD and MTD totals | Window Functions
16:01
Learn at Knowstar
Рет қаралды 43 М.
SQL Tutorial | How to Read Data from XML Column? XQuery Methods
26:08
Learn at Knowstar
Рет қаралды 9 М.
SQL Query | How to dynamically convert rows into columns | Dynamic Pivot
16:18
SQL Tutorial - Compare Current Row and Previous Row
7:37
Absent Data
Рет қаралды 11 М.
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 64 МЛН