Finished QueryBuilder (untested)