From a09277b3a7de47d74497c10fddb0fa42a8cc0212 Mon Sep 17 00:00:00 2001 From: Mikel Cortes Date: Wed, 22 Nov 2023 14:25:34 +0000 Subject: [PATCH] format sql queries --- pkg/db/postgresql/crawler_metrics.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/db/postgresql/crawler_metrics.go b/pkg/db/postgresql/crawler_metrics.go index 5bc0888..071e5f2 100644 --- a/pkg/db/postgresql/crawler_metrics.go +++ b/pkg/db/postgresql/crawler_metrics.go @@ -223,7 +223,8 @@ func (db *DBClient) GetHostingDistribution() (map[string]interface{}, error) { WHERE pi.deprecated='false' and attempted = 'true' and client_name IS NOT NULL and - ips.mobile='true' and to_timestamp(last_activity) > CURRENT_TIMESTAMP - ($1 * INTERVAL '1 DAY') + ips.mobile='true' and + to_timestamp(last_activity) > CURRENT_TIMESTAMP - ($1 * INTERVAL '1 DAY') ) as aux `, LastActivityValidRange, @@ -283,7 +284,8 @@ func (db *DBClient) GetHostingDistribution() (map[string]interface{}, error) { WHERE pi.deprecated='false' and attempted = 'true' and client_name IS NOT NULL and - ips.hosting='true' and to_timestamp(last_activity) > CURRENT_TIMESTAMP - ($1 * INTERVAL '1 DAY') + ips.hosting='true' and + to_timestamp(last_activity) > CURRENT_TIMESTAMP - ($1 * INTERVAL '1 DAY') ) as aux `, LastActivityValidRange,