db import fixed, sql select last 3 cycles statement fixed