SQL | How to sum in same table but referring to different cell values
Don't forget GROUP BY clause when using aggregate functions.
Your inner SUMs aren't aliased, so x.quantity won't work.


Try this :

SELECT x.productName, SUM(x.quantity) as quantity
FROM 
(
    SELECT productName, SUM(quantity*10) as quantity
    FROM Sample
    WHERE description IN ('GT','GE')
    GROUP BY productName

    UNION ALL
    SELECT productName, SUM(quantity*20) as quantity
    FROM Sample
    WHERE description IN ('VD') 
    GROUP BY productName
) AS x
GROUP BY x.productName