sqlMinAge and sqlMaxAge functions