floor
floor copied to clipboard
Query with IF
Hi all is it possible to do query with IF?
@DatabaseView("SELECT SUM(if (eventType = Entrata, eventAmount, eventAmount*(-1))) as eventAmounts,eventDate FROM Event GROUP BY eventDate", viewName: 'EventForChart') class EventForChart{
DateTime eventDate; double eventAmounts;
EventForChart(this.eventDate,this.eventAmounts); }
Like this one?
Hi @ferut,
Could it be that you are looking for IIF?
https://www.sqlitetutorial.net/sqlite-functions/sqlite-iif/