I am inserting data into a table in Sqllite DataBase which are ever increasing , if it decreased at some time, it uses the last increased value as base. See the following table where fields are Application, time and Data Captured at that time.
>1. YouTube 04:10PM 200KB
>2. YouTube 04:20PM 400KB
>3. YouTube 05:10PM 100KB
>4. YouTube 06:10PM 200KB
>5. YouTube 07:10PM 600KB
>6. YouTube 08:10PM 500KB
>7. YouTube 08:40PM 700KB
>8. YouTube 08:40PM 100KB
>9. YouTube 09:10PM 200KB
>10. YouTube 10:10PM 600KB
As data decreased in 3 , from 3 to 6(i.e till data are increasing), i need to access 2. Again in 6, Value is decrased. So from 6 to 7, i need to access last increased value in 5. Again in 8, the Value is decreased. So from 8 to 10, i will access last increased value in 7.
So basically I will use the last increased value. I can’t find a proper sql query which will get me the last increased value from my database
If I understand you question correctly MAX(Data Captured) should do the trick