return without max field

This commit is contained in:
Emily 2019-03-11 13:31:25 +01:00
parent 6afbcb69f1
commit ccd04ba7fb

View File

@ -13,7 +13,7 @@ ARGS = {
}
SQL_STRUCT = {
"main": "SELECT search.*, max(search.file_version) FROM updates search %s GROUP BY filename;",
"main": "SELECT max(search.file_version) as file_version, search.* FROM updates search %s GROUP BY filename;",
"file_hash": "WHERE %s <= %s",
"file_version": "WHERE %s <= %s",
"timestamp": "INNER JOIN ( SELECT file_version, file_version FROM updates WHERE %s = '%s' ) find ON search.file_version <= find.file_version"