Running totals without over() clause | SQL interview question

 DML Script:

DROP TABLE IF EXISTS  ProcessLog;

GO


CREATE TABLE ProcessLog

(

Workflow       VARCHAR(100),

ExecutionDate  DATE 

);

GO


INSERT INTO ProcessLog (Workflow, ExecutionDate) VALUES

('Alpha','6/01/2018'),('Alpha','6/14/2018'),('Alpha','6/15/2018'),

('Bravo','6/1/2018'),('Bravo','6/2/2018'),('Bravo','6/19/2018'),

('Charlie','6/1/2018'),('Charlie','6/15/2018'),('Charlie','6/30/2018');

GO


Comments

Popular posts from this blog

50 Essential SQL Questions to Land Your Dream Job

How to find all the customers who placed orders on three consecutive days | SQL Scenario questions

ACCENTURE SQL INTERVIEW QUESTION | Change the ProductIDs