Identifying by ip + user_agent.
This commit is contained in:
parent
0b968afa1a
commit
5576215fd4
@ -45,20 +45,20 @@ EOF
|
|||||||
my $data = $dbh->selectrow_hashref(<<'EOF', undef);
|
my $data = $dbh->selectrow_hashref(<<'EOF', undef);
|
||||||
SELECT
|
SELECT
|
||||||
(
|
(
|
||||||
SELECT COUNT(DISTINCT remote_address) FROM requests
|
SELECT COUNT(DISTINCT (remote_address, user_agent)) FROM requests
|
||||||
) as unique_ips,
|
) as unique_ips,
|
||||||
(
|
(
|
||||||
SELECT COUNT(DISTINCT remote_address)
|
SELECT COUNT(DISTINCT (remote_address, user_agent))
|
||||||
FROM requests
|
FROM requests
|
||||||
where date > NOW() - interval '1 day'
|
where date > NOW() - interval '1 day'
|
||||||
) as unique_ips_last_24_hours,
|
) as unique_ips_last_24_hours,
|
||||||
(
|
(
|
||||||
SELECT COUNT(DISTINCT remote_address)
|
SELECT COUNT(DISTINCT (remote_address, user_agent))
|
||||||
FROM requests
|
FROM requests
|
||||||
where date > NOW() - interval '1 week'
|
where date > NOW() - interval '1 week'
|
||||||
) as unique_ips_last_week,
|
) as unique_ips_last_week,
|
||||||
(
|
(
|
||||||
SELECT COUNT(DISTINCT remote_address)
|
SELECT COUNT(DISTINCT (remote_address, user_agent))
|
||||||
FROM requests
|
FROM requests
|
||||||
where date > NOW() - interval '1 month'
|
where date > NOW() - interval '1 month'
|
||||||
) as unique_ips_last_month;
|
) as unique_ips_last_month;
|
||||||
|
Loading…
Reference in New Issue
Block a user