Create timeline via SQL
Hello together,
I want to create a timeline in SQL to generate a barchart in a client application. The request from the client application should only restrict the start- and the enddate.
As result for '2010-01-01' to '2010-01-05' the following is expected:
DATE | COUNT
-------------
2010-01-01 | 1
2010-01-02 | 4
2010-01-03 | 1
2010-01-04 | 0
2010-01-05 | 10
The given datatable contains 16 rows, 1 for each count and none with '2010-01-04'.
The idea is getting a row for each date between '2010-01-01' and '2010-01-05' and get the count via a subselect.
I hope I described my wish so everyone can understand what I want! ;)
So, thanks for your additional ideas/input!
regards,
Tobias
ps: sorry, I forgot we are using Oracle 10.2.1.0