test some sql query building.