mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
fix stats query
This commit is contained in:
parent
810ae101ed
commit
aa8057f9fe
3 changed files with 2 additions and 5 deletions
|
|
@ -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}))`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue