mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
update CH rawquery and type
This commit is contained in:
parent
d13f0bc5fe
commit
e2bb2defd4
17 changed files with 169 additions and 52 deletions
|
|
@ -172,7 +172,7 @@ async function clickhouseQuery(
|
|||
);
|
||||
}
|
||||
|
||||
return rawQuery<{ level: number; count: number }[]>(
|
||||
return rawQuery(
|
||||
`
|
||||
WITH level0 AS (
|
||||
select distinct session_id, url_path, referrer_path, created_at
|
||||
|
|
@ -201,7 +201,7 @@ async function clickhouseQuery(
|
|||
).then(results => {
|
||||
return urls.map((a, i) => ({
|
||||
x: a,
|
||||
y: results[i]?.count || 0,
|
||||
y: Number(results[i]?.count) || 0,
|
||||
z: (1 - Number(results[i]?.count) / Number(results[i - 1]?.count)) * 100 || 0, // drop off
|
||||
}));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue