Logical Order Of Operations In Sql