flatten mv's from query