mercredi 9 décembre 2015

SQLite Select diffrent where clause

I'm stuck with queries. Basically I want to get two results of the same field, according to two where clauses, then. Sum (field1) when (ins_n = 0) and sum (field1) when (ins_n = 1). I hope I explained. Now I can only do so when (ins_n = 0)

"SELECT " +
"SUM(field1) AS incasso1, " +                
"FROM Movimentinegozio WHERE ins_n = 0 ";

Aucun commentaire:

Enregistrer un commentaire