Skip to content

Commit

Permalink
format sql queries
Browse files Browse the repository at this point in the history
  • Loading branch information
cortze committed Nov 22, 2023
1 parent c8a3bbf commit a09277b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/db/postgresql/crawler_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a09277b

Please sign in to comment.