BoD / android-contentprovider-generator

A tool to generate Android ContentProviders.
GNU General Public License v3.0
619 stars 151 forks source link

How to use sum? #94

Closed umanusorn closed 8 years ago

umanusorn commented 8 years ago

I want to use groupBy and sum together

BoD commented 8 years ago

There is a groupBy method in the AbstractSelection class (that all Selection classes extend).

umanusorn commented 8 years ago

Yes I already use group by, its working well. However, I also want to sum value too. e.g.

name price a 3 a 2 b 4

I want name price a 5 b 4

but only GroupBy I got name price a 3 b 4

BoD commented 8 years ago

I'd have to see your code, but basically you simply need to have "sum(price)" in your selection.