I have written the following query
String rawQuery="select * FROM (select email,name,createdat,ROW_NUMBER() OVER (PARTITION BY email ORDER BY createdat DESC) AS RowNumber FROM vitals ) a where RowNumber=?";`
This should return me data that contains unique email id but other data that is not unique. But i am getting the following error
Caused by: android.database.sqlite.SQLiteException: near "(": syntax error (code 1): , while compiling: select * FROM vitals,(select email,name,createdat,ROW_NUMBER() OVER (PARTITION BY email ORDER BY createdat DESC) AS RowNumber FROM vitals ) a where RowNumber=?
i refered to this linkenter link description here