I have a sqlite database. I have three columns: _id, date, value.
Now I want to extract the counter _id: s depending on the day in the date and calculate the average value of int. This is an Android app.
So, I want to "select day by day and for each day (for sixty days), calculate how many _id: s there are for this day. Finally, calculate the average.
I think this is something like:
"SELECT DATE('now' 'days[i]') as date, COUNT(_id) as count, AVG(value) as vl FROM v_efforts WHERE DATE(v_efforts.date) = DATE('now' 'days[i]')";
But I canβt make it 'days[i]'work. I do not know how I can increase this value to sixty, and then how I can store the account and vl for each of these sixty days.
Extremely important!
source
share