Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

fix redudant query statement

Bill Yang9f3a9ad0ca71
diff --git a/server/src/api/analytics/getSingleCol.ts b/server/src/api/analytics/getSingleCol.ts
index 91998d5bf..1bd17f438 100644
--- a/server/src/api/analytics/getSingleCol.ts
+++ b/server/src/api/analytics/getSingleCol.ts
@@ -178,7 +178,6 @@ const getQuery = (request: FastifyRequest<GetSingleColRequest>, isCountQuery: bo
if (parameter === "exit_page" || parameter === "entry_page") {
const isEntry = parameter === "entry_page";
const orderDirection = isEntry ? "ASC" : "DESC";
- const rowNumFilter = isEntry ? "row_num = 1" : "row_num = 1";
const baseCteQuery = `
SessionPageCounts AS (
@@ -228,7 +227,7 @@ const getQuery = (request: FastifyRequest<GetSingleColRequest>, isCountQuery: bo
FilteredDurations AS (
SELECT *
FROM PageDurations
- WHERE ${rowNumFilter}
+ WHERE row_num = 1
),
PathStats AS (
SELECT