I have a table similar to this:
| id(INTEGER) | id2(INTEGER) | time(DATETIME) | value(REAL) |
|-------------|--------------|----------------------|-------------|
| 1 | 2000 | 2004-01-01 00:00:00 | 1000 |
which I query with visual basic. Now I want to sum all entries between year 2004 and 2010 so the result looks like this:
2004 11,000
2005 35,000
2006 46,000
cIf I do it inside visual basis it is achieved with few loops but unfortunately this is not very performant.
Is it possible to create a query which yields the result say between two years grouped by years. Or between two months (within one year), grouped by months, days (within one month), hours (within one day), minutes (within one hour)?
Aucun commentaire:
Enregistrer un commentaire