Question: I'm looking into doing some maths from my mysql data. I want to multiple the data from a row by 10 for example

```
 ORDER_ID    Sum
   3          8
   4          3
   5          15

```

So what i want is to be able to print the results from this (10\*8\*3\*15) 

thnks

Answer: 
If you really want 10\*8\*3\*15 you can do it in MySQL like this

```
mysql> set @sum := 10;
Query OK, 0 rows affected (0.00 sec)

mysql> select @sum := @sum * sum from test;
+--------------------+
| @sum := @sum * sum |
+--------------------+
|                 80 |
|                240 |
|               3600 |
+--------------------+
3 rows in set (0.00 sec)

mysql> select @sum;
+------+
| @sum |
+------+
| 3600 |
+------+
1 row in set (0.00 sec)

```

If you want the more realistic value 10\*(8+3+15) you would do like this

```
mysql> select sum(sum)*10 from test;
+-------------+
| sum(sum)*10 |
+-------------+
|         260 |
+-------------+
1 row in set (0.00 sec)

```
If you prefer you can do with that query

```
select max(res) result from(
select @sum:= @sum*b res from(
SELECT @sum:=10, value as b FROM test
) x
) y

```

Thanks to Andreas for the answer