This actually generates queries and outputs results!