Running Total WITHOUT Window Function | Cumulative SUM in SQL | Deepankar Pathak
HTML-код
- Опубликовано: 23 сен 2024
- 📊 Mastering Running Total WITHOUT Window Function in SQL & Cumulative SUM in SQL Watch it to avoid Mistakes in the Interview 📊
Here we are going to discuss SQL Interview Questions, These are the same SQL Interview Questions and answers, that are from the KPMG\ Deloitte\ BIG 4 Interview Problem.
running sum in SQL
running calculation in sql
Running SUM WITHOUT Windows Function
Problem With running SUM
Data engineer sql interview questions
Data analyst sql interview questions
Deloitte SQL Interview
data analyst interview
deloitte interview
KPMG interview
deloitte sql interview questions
big 4 sql interview questions
pwc sql interview
data analytics sql interview
data analytics
sql interview questions
sql tutorial
sql server interview questions
sql server interview questions and answers
sql interview questions and answers
top sql interview questions and answers
sql interview questions and answers in hindi
sql interview questions
sql query interview questions and answers
sql queries interview questions and answers for experienced
sql interview
sql questions and answers
top sql questions
sql interview questions for freshers
sql interview questions for beginners
sql interview questions for experienced
intermediate level sql interview questions
sql interview preparation
sql basic questions
sql questions
sql query
interview questions sql
interview question sql join
interview questions sql basic
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
SCRIPT USED :-
CREATE TABLE New_Sales (
Date VARCHAR(512),
Salary INT
);
INSERT INTO New_Sales (Date, Salary) VALUES ('01-01-2024', '100');
INSERT INTO New_Sales (Date, Salary) VALUES ('02-01-2024', '800');
INSERT INTO New_Sales (Date, Salary) VALUES ('03-01-2024', '1100');
INSERT INTO New_Sales (Date, Salary) VALUES ('04-01-2024', '1200');
INSERT INTO New_Sales (Date, Salary) VALUES ('05-01-2024', '1300');
INSERT INTO New_Sales (Date, Salary) VALUES ('06-01-2024', '1400');
INSERT INTO New_Sales (Date, Salary) VALUES ('07-01-2024', '1500');
INSERT INTO New_Sales (Date, Salary) VALUES ('08-01-2024', '1600');
INSERT INTO New_Sales (Date, Salary) VALUES ('09-01-2024', '1700');
INSERT INTO New_Sales (Date, Salary) VALUES ('10-01-2024', '1800');
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
#dataanalytics #powerbi #sqlinterviewquestions #sql
Very good explanation! 😊👍
select *,sum(Salary) over (order by Date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as sum from New_Sales;
That's great 👍. But please give it a try without Windows Function.
Bhaiya.. I have 2.3 yrs of experience in SQL and mangoDB servers now I am trying to switch my current job how much salary I would ask???