more work on sql