Well, i actually modify the code u gave me. If i run exactly the same code,
Code:
select user_id, t_stamp
from (
select user_id,
t_stamp,
count(*) over (partition by user_id, extract(minute from t_stamp)::int / 15) as num_dupes
from click_log
) t
where t_stamp between date_trunc('hour',timestamp '2010-05-18 13:44:00' - interval '1 hour')
and date_trunc('hour', timestamp '2010-05-18 13:44:00') and num_dupes > 1
order by t_stamp;
i got this error:
Quote:
ERROR: function pg_catalog.date_part("unknown", text) does not exist
LINE 5: count(*) over (partition by user_id, extract(minute...
^
HINT: No function matches the given name and argument types. You may need to add explicit type casts.
|