No video

SQL Query | How to calculate YTD and MTD totals | Window Functions

  Рет қаралды 41,897

Learn at Knowstar

Learn at Knowstar

Күн бұрын

This video discusses the SQL Query to calculate the YTD and MTD Totals.
It also discusses the importance of window framing in SQL.
Please do not forget to like, subscribe and share.
For enrolling and enquiries, please contact us at
Website - knowstar.org/
Facebook - / knowstartrainings
Linkedin - www.linkedin.c...
Email - learn@knowstar.org

Пікірлер: 45
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Register at the below link to get US $100 off for Coursera Plus membership between Sep 8 - Sep 29, 2022. The Coursera Plus membership gets you access to unlimited courses and unlimited certifications! imp.i384100.net/Ke51on
@Mahesh-sg8xz
@Mahesh-sg8xz 11 ай бұрын
Hello mam, 🤔🤔I having a doubt here !! you told that when calculating YTD / MTD we need to order it by unique column like (order_id), but it's important to clarify that using order_id for ordering within each year's partition may not guarantee the correct chronological order of orders within that year. If order_id is assigned arbitrarily or does not correspond to the actual date and time of the order, it can lead to inaccurate YTD calculations. so I think the best way is to order it by order_date instead of order_id. by the way your explanation is really outstanding 👍👍
@rajasekharareddy9870
@rajasekharareddy9870 3 жыл бұрын
Awesome video! This is really helpful for me. Thanks a ton. Keep doing these type of videos more and more.!
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thank you
@jaideepchauhan4214
@jaideepchauhan4214 3 жыл бұрын
Great way of explanation of whole concept, Thanks for this.
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thank you
@arpitshivhare2991
@arpitshivhare2991 3 жыл бұрын
Great explanation. I am using SAP HANA to achieve this, unfortunately, it doesn't allow ROWS or Range Function even though it allows lots of Window Function.
@DilipKumar-hb7es
@DilipKumar-hb7es Жыл бұрын
Hello Arpit. Could you please suggest in HANA how to calucalte total sales of material for every month in that year for the last 12 months . Which function we are going to use in window function to acheive it . Kindly suggest. Thank you.
@kristyowens2284
@kristyowens2284 3 жыл бұрын
Very well explained the window frame options. Waiting for your next video!
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thank you
@allaboutdata5523
@allaboutdata5523 3 жыл бұрын
This is superb... Easy to understand
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@naynayne7378
@naynayne7378 2 жыл бұрын
Really good explanation!!!! I love this video
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
Thank you
@dimpyrathore818
@dimpyrathore818 3 жыл бұрын
Great explanation
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thank you
@slavchevbg
@slavchevbg 3 жыл бұрын
Thank you so much! Great video!
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thank you
@hv0032113
@hv0032113 3 жыл бұрын
Nicely explained. Keep up the good work
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thank you
@allaboutdata5523
@allaboutdata5523 3 жыл бұрын
Hey, Nice video One qsn, how do u decide/calculate current row in framing?
@LearnatKnowstar
@LearnatKnowstar 2 жыл бұрын
The current row is the row being processed by the database
@user-ey9nr1em4w
@user-ey9nr1em4w Жыл бұрын
Solved my problem. Thanks a lot !!
@LearnatKnowstar
@LearnatKnowstar Жыл бұрын
Glad it helped!
@jacksparrowcapitan3232
@jacksparrowcapitan3232 3 жыл бұрын
Great video thanks!!!
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
Thank you
@TheRaju991
@TheRaju991 Жыл бұрын
Very helpful video. Thank you 😃
@LearnatKnowstar
@LearnatKnowstar Жыл бұрын
Thank you
@AK-Star007
@AK-Star007 3 жыл бұрын
you read my mind or sentiments lol, THANX!
@AK-Star007
@AK-Star007 3 жыл бұрын
plz add query for previous year ytd in next column YTD YTDprevious
@jaitiwari241
@jaitiwari241 Жыл бұрын
Nice one but plz share sql script to practice
@anitamartolia2320
@anitamartolia2320 Жыл бұрын
Can you write a query of interest projection of daily amount deposit in account but amount is not equal daily
@DeepakPrabhu-ub9th
@DeepakPrabhu-ub9th 2 ай бұрын
How to get the database for each and every query your sharing
@lingxu9697
@lingxu9697 2 жыл бұрын
What if we add SalesOrderNumber to order by, does that works the same as adding a ROWS BETWEEN?
@trinadhravada9467
@trinadhravada9467 2 жыл бұрын
what is the way to handle null values or missing months in windows function
@sowmithrivinayparavastu9351
@sowmithrivinayparavastu9351 2 жыл бұрын
@2:45 Order by is not mandatory if over clause is there. if order by is not there, we get total sum without any windowing.
@deeppokhrel1044
@deeppokhrel1044 2 жыл бұрын
Is not the Salesorder number different that has the same order date ? How is that duplicate .. what is the unique row definition there.. could you please elaborate ?
@imranpathan8352
@imranpathan8352 3 жыл бұрын
Hi Nice video Pls provide database for practice
@LearnatKnowstar
@LearnatKnowstar 3 жыл бұрын
You can install AdventureWorks database form Microsoft for practice.
@imranpathan8352
@imranpathan8352 3 жыл бұрын
Hi u can teach ssis and cloud computing...I want learn
@dhinesh1733
@dhinesh1733 Жыл бұрын
I want to make balance as 0 if it ends in negative value, how can I do?? Pls reply
@JupyterBA
@JupyterBA 2 жыл бұрын
Can you pls help us to calculate year to month end ?
@agape13
@agape13 3 жыл бұрын
🏆🥇
@karandeepsingh7000
@karandeepsingh7000 9 ай бұрын
What about QTD?
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 4,4 МЛН
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 29 МЛН
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 4,4 МЛН