cleaning up sql in example