mardi 15 mars 2016

DBFlow 'count as'

I want to execute the following statement in DBFlow:

SELECT SECTION_ID, COUNT(SECTION_ID) AS SECTION_COUNT FROM ARTICLES GROUP BY SECTION_ID ORDER BY SECTION_COUNT DESC

What I tried is:

Select(Article_Table.sectionId).from(Article.java).count(???) ...

The Flow object has a count()method but it takes a DatabaseWrapper as an argument which I frankly don't understand, I would have expected it to take a Table Column (i.e. Property).

Any ideas how I can do this?

Aucun commentaire:

Enregistrer un commentaire