produce seconds from last query on db