Facebook
From Colorant Cat, 8 Years ago, written in Oracle 9.2 PL/SQL.
This paste is a reply to Re: Re: Re: Re: Untitled from Blush Lion - view diff
Embed
Download Paste or View Raw
Hits: 510
  1. SELECT t. kod, t.nazwa,
  2. ROUND((((AVG(o.rozchodwartosc)-AVG(o.przychodwartosc))/AVG(o.rozchodwartosc))*100),2)
  3. AS "MARZA [%]",
  4. ROUND((((AVG(o.rozchodwartosc)-AVG(o.przychodwartosc))/AVG(o.przychodwartosc))*100),2)
  5. AS "NARZUT [%]"
  6. FROM obroty o JOIN towary t
  7. ON o.TOWAR=t.id
  8. GROUP BY t.kod, t.nazwa;