rework query generation
rework query generation

we now generate parameterized SQL instead of grabbing a list of event
ids

genome/civic-server,genome/civic-server,genome/civic-server,genome/civic-server,genome/civic-server