Question: I'm using phpMyAdmin and I've this SQL table:

\_\_\_SalesTaxes

```
|--------|----------|------------|
| STX_Id | STX_Name | STX_Amount |
|--------|----------|------------|
|      1 |    Tax 1 |       5.00 |
|      2 |    Tax 2 |      13.50 |
|--------|----------|------------|

```

How can I sum the total of the taxes if I know the `STX_Id` to sum.

For example, I need to sum the `1` and `2` to give `18.50`.

What I tried:

```
SELECT SUM(STX_Amount) 
FROM ___SalesTaxes
WHERE FIND_IN_SET(STX_Id, '1,2') > 0
AS sum_taxes;

```

Thanks.

Answer: 
should be using `IN` instead of aggregate function `FIND_IN_SET`.

```
SELECT SUM(STX_Amount) 
FROM ___SalesTaxes
WHERE STX_Id IN ('1','2') 

```

Here's a [Demo](http://sqlfiddle.com/#!9/f97b0e/1)
Remove 'AS sum\_taxes' from the end of your query.

```
SELECT SUM(STX_Amount) 
FROM ___SalesTaxes
WHERE FIND_IN_SET(STX_Id, '1,2') > 0

```