title: I want to retrieve the total of amount from particular date which i am giving using Long.what will be query for that in room database
body: <p>I want to retrieve the total of amount from a particular date which I am giving using Long.what will be a query for that in room database.here is the query I am written it's not displaying the total amount.</p>
  
  <pre><code>@Query("SELECT sum(amount), expense_id, Date FROM EXPENSE Where amount in (SELECT amount FROM Expense WHERE Date BETWEEN :from AND :to)")
  List&lt;Expense&gt; expenseBetweenDates(long from, long to);
  </code></pre>