Yes,I've already figured out the mistake.
Can you please try this one?
Please Tell me if it worked
SELECT a."date",a."theme",a.receiver,COUNT(*)
FROM (SELECT DISTINCT * FROM t_loredana) a
INNER JOIN t_loredana b
ON a."theme" = b."theme" AND a.receiver = b.receiver
WHERE (((b."date" - a."date") = 1) OR (b."date" - a."date") = 0)
GROUP BY a."date",a."theme",a.receiver
HAVING (a."date" - '2007-01-01' ) % 2 = 0
ORDER BY a."date"
----- Original Message -----
Sent: Thursday, May 10, 2007 8:15 AM
Subject: Re: Fw: [NOVICE] Count rows group by time intervals
Hi Oliveiros,
With your query I get the following result
date | theme | receiver | count
------------------------------------+----------+----------------------+-------
2007-04-27 00:00:00+00 | MIA | +40741775621 | 25
2007-04-25 00:00:00+00 | LIA | +40741775621 | 50
2007-05-09 00:00:00+00 | MIA | +40741775621 | 1
2007-04-27 00:00:00+00 | LIA | +40741775621 | 81
The count it is not correct.
Best,
Loredana