sort db results by createAt field