Java program which takes a list of queries and a table of parameters and runs the queries