I am uploading a CSV file which is been uploaded row wise in my couchbase. Now I want to show that data in table form in UI but while querying I’m getting old data first then the latest data in the end but
I want to get my last uploaded or current uploaded data in that table.
select * from Report where Report.DocumentID = ((SELECT Report.DocumentID from Report ORDER BY Report.DocumentID DESC))[0]
but this is giving error
[
{
“code”: 4020,
“msg”: “Duplicate subquery alias Bilateral_Repo”,
“query_from_user”: “select * from Bilateral_Repo where Bilateral_Repo.DocumentID = ((SELECT Bilateral_Repo.DocumentID from Bilateral_Repo ORDER BY Bilateral_Repo.DocumentID DESC))[0]”
}
]