complete sql part