Fixing conflikt in sql