Adding inner join.

This commit is contained in:
sergiotarxz 2023-05-02 19:04:59 +02:00
parent e4157ace4f
commit 4fec83a864

View File

@ -88,9 +88,8 @@ SELECT paths.path,
$SELECT_GLOBAL $SELECT_GLOBAL
where requests.path = paths.path and date > NOW() - interval '1 month' where requests.path = paths.path and date > NOW() - interval '1 month'
) as unique_ips_last_month ) as unique_ips_last_month
FROM paths; FROM paths INNER JOIN requests on paths.path = requests.path
WHERE requests.date > NOW() - interval '1 month';
EOF EOF
return $data; return $data;
} }