Below is my Query ,
I have Met all the Condition
so that it should work in Zoho Reports
SELECT myTable.*
FROM "myTable"
WHERE myTable."ID" = (SELECT T."ID"
FROM "myTable" T
WHERE DATE(T."date n time") = DATE(myTable."date n time") and
T."Name" = myTable."Name"
ORDER BY myTable."Error Count"
LIMIT 1
)
But, I am getting error as "Whenever a table alias is defined, kindly use table alias name before the respective columns used in SELECT query", and I can't save the Query
Even I Tried putting Quotes across table Name,
Like ..
SELECT "myTable".*
FROM "myTable"
WHERE "myTable"."ID" = (SELECT "T"."ID"
FROM "myTable" T
WHERE DATE("T"."date n time") = DATE("myTable"."date n time") and
"T'."Name" = "myTable"."Name"
ORDER BY "myTable"."Error Count"
LIMIT 1
)
Still Same Error...
There may be a Bug in SQL which is giving me this error continuously.
My Table is simple Looks Like
My Query is to select Single Best Record for each NameID, grouped by Date, My DataTable under Zoho Reports, Gets 2
Records for every Name ID for each Working Date, I need to Query out the Best record(Complete Row) , it is
selected based on the least value(Better Record) under column “Error Count” Grouped on Date and Result
Sorted on Name ID . As shown in OutPut Table below.
Kindly attention Zoho team On this as this as it can be 1) I who may be wrong with the SQL phrasing 2) or Zoho SQLCloud interpretation issue due to a Bug.
I appreciated forum members help on this.
regards
Satish K