ousainou ceesay

ousainou ceesay

  • 1.9k
  • 29
  • 338

Query the sum of row values in sqlite on with Xamarin

Aug 12 2019 9:38 AM
Hello guys. Am trying to the sum of row values of sqlite database. My sqlite table has a row called Amount. So what I want is to sum all the Amount values on the table. This is my code :
 
public async Task SumItemAsync()
{
var data = await db.ExecuteScalarAsync("SELECT SUM(Amount) FROM Spent");
return data;
}
but it.s giving me an error saying "the type arguments for method sqliteAsyncConnection.ExecuteScalarAsync(string, param object[]) cannot be infered from the usage. Try specifying the type argument explicitly" . Any help.
 

Answers (1)