Question: I have seen is that the operator **MINUS** doesn't exists here. I have been reading that I can use `EXCEPT` but is not working for me.

What I want is to get the sum of a value from one table and the sum of the value of other table and subtract them, for instance:

```
Select sum(ipaq.cant) from tablee12a as paq inner join xtable15 as ipaq on paq.pkey = ipaq.ppkey where paq.pkey = '1ke1'
Except --Minus
Select sum(galvet.cantidad) from tablee12a as paq inner join tableegv as galvet on paq.pkey = galvet.paqkey where paq.pkey = '1ke1'

```

Answer: 
Both `MINUS` and `EXCEPT` are *set* operators. If you just have two scalars and want to subtract one from the other, compute the scalars as subselects and use `-`:

```
SELECT
(
Select sum(ipaq.cant) from tablee12a as paq inner join xtable15 as ipaq on paq.pkey = ipaq.ppkey where paq.pkey = '1ke1'
) -
(
Select sum(galvet.cantidad) from tablee12a as paq inner join tableegv as galvet on paq.pkey = galvet.paqkey where paq.pkey = '1ke1'
)

```
You are just looking for the subtraction operator. That said, I'm wondering if the inner join is actually necessary.

Does this simpler version do what you want?

```
select (select sum(ipaq.cant)
        from xtable15 as ipaq  
        where ipaq.pkey = '1ke1'
       ) - 
       (sum(galvet.cantidad)
        from tableegv galvet 
        where galvet.paqkey = '1ke1'
       )

```