add advance to query db by any interval, not implement to flot yet