Combined multiple queries into one.