I am sorry in advance, I tried researching it but can't seem to find something that fits.
Following i have found already, but can not use for my issue:
Filtering MySQL query result set to yield multiple occurences within a specific period of time
SQL Query To Obtain Value that Occurs more than once
I was not able to modify these statements to solve my issue.
I would like to select all occurances of a Data which occurs five times or more in a Table within 24 hours. The table contains data about the past years.
The Table is not sorted by Date (Timestamp dd.mm.yy hh:mm:ss,sssssssss)
This shows me the overall occurance >= 5, but not if this happened within 24 hours.
SELECT Column, COUNT(*) FROM Table
GROUP BY Column
HAVING COUNT(*) >= 5;
Any suggestions for search keywords are welcome.
Thank you in advanced. Best regard Denyo
EDIT: Thank you all for your help and im sorry for the bad asked question. Ill try to answer all your questions.
@mathguy The Database version is 12c.
It does have one column for "data" and another column for date (timestamp). I would like to find occurrences of the same value in the "data" column within a <=24 hour window from 1st occurence of this value.
@Matthew McPeak Im still trying to understand your SQL Statement. Sry im totally new with SQL. This ist obvious by the way i asked my question :(.
@Aurelian My question is not well asked. So your answer couldn't fit, im sorry.
@all I feel bad about my bad asked question and wasting your time.
I hope you'll accept my apology.
Best regards Denyo
EDIT2: Im trying this now
begin
for i in (select Table.DATE(Timestamp), Table.IP, Table.Value from Table)
loop
dbms_output.put_line(i.Value); (instead of this output, i would like to add another loop and compare the Date(Timestamp) with i.DATE and count if matches
end loop;
end;