Merge all matching attributes from parameters into query.