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

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

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 11 ай бұрын
Glad it was helpful!
@kristyowens2284
@kristyowens2284 4 жыл бұрын
Great job. Thank you for your efforts.
@LearnatKnowstar
@LearnatKnowstar 4 жыл бұрын
Thank you
@Beyondhorizons-i5z
@Beyondhorizons-i5z 4 жыл бұрын
Excellent explanation.
@LearnatKnowstar
@LearnatKnowstar 4 жыл бұрын
Thank you
@hv0032113
@hv0032113 4 жыл бұрын
Amazing. Very helpful.
@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
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 10 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 145 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 98 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 28 МЛН
Marimo: Code Web Applications with Python Notebooks
12:58
NeuralNine
Рет қаралды 1,6 М.
SQL Query | How to dynamically convert rows into columns | Dynamic Pivot
16:18
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 find employees with highest salary in a department
10:38
REAL TIME CASE 8 : Business Days Excluding Weekends and Public Holidays
14:20
Data Info @Rajanikanth Gaja
Рет қаралды 117
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 10 МЛН