Question: ```
SELECT account_name ,sum(total_balance) from transaction 
where account_name IN('cash','a/r','supplies','prepaid','land','gold')
AS total_assets
ORDER BY account_name

```

> 
> 1064 - 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 'as total\_assets order by account\_name LIMIT 0, 30' at line 3
> 
> 
>

Answer: 
You have an alias in the wrong place.

```
SELECT account_name ,sum(total_balance) from transaction 
where account_name IN('cash','a/r','supplies','prepaid','land','gold')
AS total_assets
ORDER BY account_name

```

should be

```
SELECT account_name ,sum(total_balance) AS total_assets
from transaction 
where account_name IN('cash','a/r','supplies','prepaid','land','gold')
ORDER BY account_name

```
remove `AS total_assets`

```
SELECT account_name ,sum(total_balance) from transaction 
where account_name IN('cash','a/r','supplies','prepaid','land','gold')
ORDER BY account_name

```