Peter Brawley wrote:
> Is there a way to total counts done in subqueries?
Select expression aliases can't be referenced at the same level. You
have to create another outer level ...
alternatively use variables:
mysql> select @first := 1 as value1, @second := 2 as value2,
@fir...@second as total;
+--------+--------+-------+
| value1 | value2 | total |
+--------+--------+-------+
| 1 | 2 | 3 |
+--------+--------+-------+
1 row in set (0.03 sec)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org