Room SQL and Subtract

24
March 20, 2019, at 02:50 AM

I have two tables in the Room database. I know how to get sum from both of them, but how to subtract one from the other?

This is my SQL query for sum of one table:

@Query("SELECT COALESCE(sum(COALESCE(value,0)), 0) FROM expense_table") LiveData getTotalValue();

The second table is called income_table

READ ALSO
Drag and Drop interfering with scroll Angular 7 CDK [ionic] [angular]

Drag and Drop interfering with scroll Angular 7 CDK [ionic] [angular]

I have an ionic app, which is built in angular, and thus has angular cdk drag and drop in it to rearrange a listDrag and drop works great, however, on mobile, I cannot scroll at all

40
WSSE Authorization

WSSE Authorization

first time in my life i stuck with problem which i can't resolveI spent one day to try and can't understand whats wrong : On server i have X-WSSE auth system :

46
Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 18611 (GLThread 17523), pid 13022 [on hold]

Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 18611 (GLThread 17523), pid 13022 [on hold]

I am facing weird crash that is happening only in Nokia Pie device

20
Android net::ERR_CACHE_MISS on debug output

Android net::ERR_CACHE_MISS on debug output

I realise that this question has been asked (and solved) here before, however the most frequent and obvious solution, which is to place

36