Quote:
Originally Posted by nbtet
However, this query only select duplicate id between 12.00 to 12.15. I also want to select the duplicate id within 12.15-12.30, 12.30-12.45 and 12.45 to 13.00. Any suggestion?
|
Try this
Code:
select id, t_stamp
from (
select id,
t_stamp,
count(*) over (partition by id, extract(minute from t_stamp)::int / 15) as num_dupes
from log
) t
where num_dupes > 1
order by t_stamp