Problem with ended parentheses alias 
I don't know if I can change this logic without introducing a possible regression for users who select arbitrary sql functions and do not alias them. The current logic looks if there's a "." within the column name, takes the stuff to the right of it and strips `"` and `)`, e.g.:

UPPER("t1"."name") -> "name") -> name

The downside is that this logic is also being applied to explicitly-given aliases. Let me think about it. The fix involved basically ensuring that user-provided aliases would be preserved, but at the same time I've tried to improve the logic when guessing at the intended destination column when it is not provided.
I had a problem trying to query data and assign an alias ended by a parentheses to each row, the data indeed is correct but the last parentheses of the alias gets cut off in the result data. Here's an example:
```
SUM(IF((((`t2`.`class` IN (%s, %s, %s)) AND (`t2`.`concept` != %s)) AND (`t3`.`cost_id` = %s)), IFNULL((`t2`.`value` * (`t3`.`value` / %s)), %s), %s)) AS `cost center (CCA)`, 
```
The result is:
```
'cost center (CCA': Decimal('139.704440000000')
```
The value is correct but the the alias is wrong due to the missing parentheses, is it possible to fix this in any way?