Simplify WHERE & add columns to create map