dcl and agregatefun
dcl and agregatefun
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'990045,'current',11255.09,1122)' at line 1
mysql> select *from accounts;
+---------+---------+-----------+------+
| anumber | atype | abalance | cid |
+---------+---------+-----------+------+
| 990004 | saving | 10250.66 | NULL |
| 990041 | savings | 125000.71 | 1122 |
| 990042 | current | 125900.32 | 1144 |
+---------+---------+-----------+------+
3 rows in set (0.00 sec)
)' at line 1
mysql> select format (avg(abalance),2) as average_balance from accounts;
+-----------------+
| average_balance |
+-----------------+
| 55,120.70 |
+-----------------+
1 row in set (0.00 sec)
mysql>