Skip to content

Instantly share code, notes, and snippets.

@fritzek fritzek/gist:1044501
Created Jun 24, 2011

Embed
What would you like to do?
create table ft_test (datum date, anzahl number);
insert into ft_test (datum, anzahl) values ('01.06.2011',5);
insert into ft_test (datum, anzahl) values ('02.06.2011',5);
insert into ft_test (datum, anzahl) values ('03.06.2011',5);
insert into ft_test (datum, anzahl) values ('04.06.2011',5);
select * from ft_test;
SELECT a.datum, (SELECT SUM (b.anzahl)
FROM ft_test b
WHERE b.datum BETWEEN '01.01.1900' AND a.datum) sum
FROM ft_test a;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.