You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to adjust this to support multiple filenames:
selectLatest fnames =
runSelectReturningList do-- for each filename in the given list..
fname <- values_ $ val_ <$> fnames
-- ..find the row with maximum version matching the filename.
limit_ 1$ orderBy_ (desc_ . (.version))
$ filter_ (Schema.File.name >>> (==. val_ fname))
$ all_ db.fileTable
However this results in a run-time error:
SqlError {sqlState ="42703", sqlExecStatus = FatalError, sqlErrorMsg ="column t0.res0 does not exist", sqlErrorDetail ="", sqlErrorHint ="There is a column named \"res0\" in table \"t0\", but it cannot be referenced from this part of the query."}
The text was updated successfully, but these errors were encountered:
For a table that looks something like:
I am looking to write a query that returns, for each given filename, the row with greatest version for that filename.
Considering first the simple case of a query for a single filename, we can write:
I am trying to adjust this to support multiple filenames:
However this results in a run-time error:
The text was updated successfully, but these errors were encountered: