I want to get the sum of total rows in a column of a table in SqlLite Database. I am using GreenDao Library. I know I Have to use SUM. But I don't know how to use it with GreenDao queryBuilder. Can anybody help me? and also DISTINCT.
How to use SUM and DINSTINCT with GreenDao querybuilder?
1.2k Views Asked by Naroju At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in GREENDAO
- Green Dao bi-directional One To One mapping
- GreenDao & Triggers strange behaviour
- How to edit the existing SQL table column values using GreenDao?
- Android SQLite can a tables name be 'TABLE'
- Android - GreenDao create/use entity and Dao class for existing sqlite database. Use greenDao with existing db
- Need a join query in greendao
- Volley library and AsyncTask
- Poor performance of greenDAO @toMany relation
- Greendao 3 generate contentprovider
- GreenDAO (Android) - Persist object in multiple tables using one insert
- Could not find method greendao() for arguments on project
- Android getActivity, getContext, getView in fragment is undefined
- How to search on multiple columns at same time using GreenDao?
- accessing db using greendao across application
- Is it correct way to open and close GreenDao 3 connection?
Related Questions in GREENDAO-GENERATOR
- Android - GreenDao create/use entity and Dao class for existing sqlite database. Use greenDao with existing db
- GreenDAO (Android) - Persist object in multiple tables using one insert
- Importing greenDAO from eclipse to Android studio 1.0 RC 2
- The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files android studio
- Green DAO relationship
- Set codeBeforeField for attribute before GreenDAO relation
- How we can reslove Greendao DB close error?
- How to add initial data for DB using GreenDao in android?
- Deleting large sqlite table
- green dao update column on play store update has taken place
- What is the best way for creating a greendao v3 session in a DAO module?
- Only using Proguard: Could not init DaoConfig => ArrayIndexOutOfBoundsException
- Where does greenDAO generator code go?
- Integrating greenDAO and Jackson
- Error when running greendao module: The target server failed to respond
Related Questions in GREENDAO3
- Could not find method greendao() for arguments on project
- How to make many-to-many relation query in GreenDAO with source property other than primary key?
- Android 25 and Espresso 2.2.2 fails instrumentation test annotations failure
- how do I get the DaoSession in a project library?
- How we can reslove Greendao DB close error?
- What is the best data type to use in greendao for Decimal(10,2)
- greenDAO update and updateInTx not working
- App crash in release build for enabling proguard when using GreenDao
- Is it better to save bitmaps to Sqlite Databse or Files handling its paths in Database ? - Android
- Android Unable to encrypt database using sqlcipher using greendao
- Working with Many to Many and GreenDao 3.1.0 - Android
- Using more than 1 Database in Greendao with 2 different Schemas - Android
- How to implement relationships in Greendao?
- How to use bi-directional Many To Many relationship with GreenDAO?
- Seed GreenDao database on Android
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This is how I did it. Assume there is the Company entity and it has the numOfEmployees field:
Note that you could hardcode the column and table names above, but this is way cleaner.