Confirmations table where user_id is the same and the time_stamp of one confirmation is strictly less than the time_stamp of the other.TIMESTAMPDIFF function to calculate the difference in seconds between the two timestamps.user_ids from the filtered results.
erDiagram
Signups {
int user_id PK
datetime time_stamp
}
Confirmations {
int user_id PK
datetime time_stamp PK
ENUM action
Signups user_id FK
}