db.session.execute(db.select([User.date_joined, User.date_joined +
    timedelta(seconds=2)], limit=1)).fetchall()
db.session.execute(db.select([User.date_joined, User.date_joined + 2], limit=1)
    ).fetchall()
Filter objects within two seconds of one another using SQLAlchemy