select l.name, c.article, c.name, smu.barcode, smg.quantity from smcard c left outer join smgoods smg on (c.article = smg.article) left outer join smstorelocations l on (smg.storeloc = l.id) left outer join smstoreunits smu on (c.article = smu.article and smu.barcodetype = 5) where smg.quantity <> 0
select l.name, c.article, c.name, smu.barcode, smg.quantity from smcard c left outer join smgoods smg on (c.article = smg.article) left outer join smstorelocations l on (smg.storeloc = l.id) left outer join smstoreunits smu on (c.article = smu.article and smu.barcodetype = 5) where smg.quantity <> 0
select c.name, u.barcode from smcard c, smstoreunits u, smgoods g where g.quantity <> 0 and g.article = c.article and u.article = c.article and u.barcodetype =5 order by 1
select ID, NAME from supermag.smstorelocations
select ID, NAME from supermag.smpricetypes
select c.name, u.barcode, p.price from smcard c, smstoreunits u, smgoods g, smprices p where g.quantity <> 0 and g.article = c.article and u.article = c.article and u.barcodetype =5 and p.article(+)=c.article and p.storeloc(+)=место_хранения and p.pricetype(+)=вид_цены order by 1
select c.name, u.barcode, p.price from smcard c, smstoreunits u, smgoods g, smprices p where g.quantity <> 0 and g.article = c.article and u.article = c.article and u.barcodetype =5 and p.article(+)=c.article and g.storeloc=место_хранения and p.storeloc(+)=место_хранения and p.pricetype(+)=вид_цены order by 1
nd p.storeloc(+)=место_хранения and p.pricetype(+)=вид_цены