select crd.name, goo.article, cast((goo.quantity-op.salequantity) as float) as operquant from smgoods goo, smopergoods op, smcard crd where crd.article = 1040282 and goo.article=op.article and crd.article = op.article and crd.article = goo.article
select crd.name, crd.article, cast((goo.quantity-nvl(sum(op.salequantity),0)+nvl(sum(-op.returnquantity),0)) as float) as quantity from supermag.smcard crd, supermag.smgoods goo, supermag.smopergoods op where crd.article = &Траляля and crd.article=op.article(+) and crd.article=goo.article group by crd.name, crd.article, quantity
select * from svgoodswithoper where article=&Траляля