Skip to content

Commit

Permalink
query last year in dapp analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
rrozek committed Aug 19, 2024
1 parent 91ab20d commit 6a75015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db/services/dappAnalyticsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ interface Filter {
const generateDateSeries = (): string[] => {
const dates = [];
const currentDate = new Date();
for (let i = 0; i < 90; i++) {
for (let i = 0; i < 365; i++) {
const date = new Date(currentDate);
date.setDate(currentDate.getDate() - i);
dates.push(date.toISOString().split("T")[0]);
Expand Down Expand Up @@ -220,7 +220,7 @@ const buildQueryForFilter = (
const query = `
WITH date_series AS (
SELECT generate_series(
CURRENT_DATE - INTERVAL '89 days',
CURRENT_DATE - INTERVAL '364 days',
CURRENT_DATE,
'1 day'::interval
) AS day
Expand Down

0 comments on commit 6a75015

Please sign in to comment.