how to use DISTINCT in GreenDao
<p>I want to query distinct rows in SqlLite, I am not getting how to query using GreenDao library for android.</p>

<pre><code> List&lt;activity&gt; activities = activityDao.queryRaw("SELECT DISTINCT "+Properties.Date_time +" FROM "+activityDao.getTablename()+" WHERE "+Properties.Contact_number+ " = "+phonenumber);
</code></pre>

<p>ERROR:</p>

<pre><code>11-13 21:12:50.915 9320-10428/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
                                              Process: com.ficean.android.ficean, PID: 9320
                                              java.lang.RuntimeException: An error occured while executing doInBackground()
                                                  at android.os.AsyncTask$3.done(AsyncTask.java:304)
                                                  at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
                                                  at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:242)
                                                  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                  at java.lang.Thread.run(Thread.java:818)
                                               Caused by: net.sqlcipher.database.SQLiteException: near "SELECT": syntax error: , while compiling: SELECT T."_id",T."FILE_UNIQUE_ID",T."CONTACT_NUMBER",T."POND_NAME",T."REMOTE_PATH",T."LOCAL_PATH",T."IN_OUT",T."SEEN",T."STATUS",T."DATE_TIME" FROM "ACTIVITY" T SELECT DISTINCT org.greenrobot.greendao.Property@176aa5bf FROM ACTIVITY WHERE org.greenrobot.greendao.Property@27a2f48c = +919063809087
                                                  at net.sqlcipher.database.SQLiteCompiledSql.native_compile(Native Method)
                                                  at net.sqlcipher.database.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:91)
                                                  at net.sqlcipher.database.SQLiteCompiledSql.&lt;init&gt;(SQLiteCompiledSql.java:64)
                                                  at net.sqlcipher.database.SQLiteProgram.&lt;init&gt;(SQLiteProgram.java:83)
                                                  at net.sqlcipher.database.SQLiteQuery.&lt;init&gt;(SQLiteQuery.java:49)
                                                  at net.sqlcipher.database.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:42)
                                                  at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1758)
                                                  at net.sqlcipher.database.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1723)
                                                  at org.greenrobot.greendao.database.EncryptedDatabase.rawQuery(EncryptedDatabase.java:32)
                                                  at org.greenrobot.greendao.AbstractDao.queryRaw(AbstractDao.java:591)
                                                  at com.ficean.android.ficean.Windows.SingleWindow.FilesLoad(SingleWindow.java:152)
                                                  at com.ficean.android.ficean.Windows.SingleWindow.access$500(SingleWindow.java:53)
                                                  at com.ficean.android.ficean.Windows.SingleWindow$LoadFiles.doInBackground(SingleWindow.java:138)
                                                  at com.ficean.android.ficean.Windows.SingleWindow$LoadFiles.doInBackground(SingleWindow.java:130)
                                                  at android.os.AsyncTask$2.call(AsyncTask.java:292
</code></pre>