Created
June 24, 2011 09:38
-
-
Save fritzek/1044501 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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