fix stats query
This commit is contained in:
1 parent
810ae101ed
commit
aa8057f9fe
3 files changed
+2
-5
No files matched your search
@@ -146,11 +146,11 @@ export function getTimestampInterval(maxColumn, minColumn) {
|
||||
const db = getDatabase();
|
||||
|
||||
if (db === POSTGRESQL) {
|
||||
return `floor(extract(epoch from max(${maxColumn}) - min(${minColumn})))`;
|
||||
return `floor(extract(epoch from (${maxColumn}) - (${minColumn})))`;
|
||||
}
|
||||
|
||||
if (db === MYSQL) {
|
||||
return `floor(unix_timestamp(max(${maxColumn})) - unix_timestamp(min(${minColumn})))`;
|
||||
return `floor(unix_timestamp(${maxColumn}) - unix_timestamp(${minColumn}))`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user