MySQL Forums
Forum List  »  Portuguese

Repeated elements per date
Posted by: Paulo Oliveira
Date: September 14, 2010 10:50AM

Hello,
I have a problem to solve and I don't know how to solve it. The reason is probably I don't know much about SQL :-)

I have a table like the one below.

date - f1- f2 - f3 - f4
d1 - a - bb - ccc - f4g
d1 - b - cc - ... - ...
d1 - c - cc - ... - ...
d2 - a - ...- ... - ...
d2 - x - ...- ... - ...
...
dn - a - ...
dn - y - ...
dn - u - ...
...
I need to select the fields than occur for every 3 consecutive days. In my example, if dn = d3, the result should be:
d1 - a - ...
d2 - a - ...
dn(3)- a - ...
Can anyone, please, help me on this?
Thsnk in advance
Paulo

Options: ReplyQuote


Subject
Views
Written By
Posted
Repeated elements per date
2797
September 14, 2010 10:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.