I'm not able to retrieve the variable total
, how do I?
@Query("SELECT SUM(item_valor) AS total FROM Itens WHERE total =>:data")
Itens getMes(String data);
The IDE warns syntax error in the WHERE clause's total variable.
My Entity:
@Entity(tableName = AppContext.TABLE_ITENS)
public class Itens {
@PrimaryKey(autoGenerate = true)
private int itemId;
@ColumnInfo(name = "item_doc")
private String doc;
@ColumnInfo(name = "item_name")
private String name;
@ColumnInfo(name = "item_valor")
private Double valor;