我有以下查询
`SELECT t.client_id,
count(t.client_id) as trips_xdays
FROM trips t
JOIN users u ON t.client_id = u.usersid
WHERE t.city_id = 12
AND t.status = 'completed'
AND ( date_trunc('day',t.dropoff_at) - date_trunc('day',u.creationtime) <= 30 days, 0:00:00)
GROUP BY t.client_id`
当我尝试将查询限制在 <= 30 天,0:00:00 时出现错误。但是,自从我查询以来,我认为这将是正确的格式
`select date_trunc('day',t.dropoff_at) - date_trunc('day',u.creationtime)
from trips t
inner join users u ON t.client_id = u.usersid`
它本身并以 30 天 0:00:00 的格式返回响应
关于如何正确查询的任何建议,以便我可以将查询限制在 <= 30 天?