Ahhh thank you! That was a very easy fix :). It also turns out I was having some problems as the well column is a look up so I need to put in some left joins as well for my WHERE statement to work on the text value rather than the primary key.