SHARE
TWEET

Untitled

a guest Nov 17th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT NVL(TO_CHAR(SALON.NAZWA), ' ') AS "SALON",
  2.     NVL(TO_CHAR(TYP_USLUGI.NAZWA), ' ') AS "USLUGA",
  3.     COUNT(USLUGA.KLIENT_ID_FK) AS "LICZBA KLIENTOW",
  4.     TO_CHAR(SUM(USLUGA.CENA)) || ' ZŁ' AS "PRZYCHOD CALOSCIOWY"
  5. FROM USLUGA, TYP_USLUGI, SALON, ROK, KWARTAL, MIESIAC, DZIEN
  6. WHERE USLUGA.DZIEN_ID_FK=DZIEN.DZIEN_ID AND
  7.     DZIEN.MIESIAC_ID_FK=MIESIAC.MIESIAC_ID AND
  8.     MIESIAC.KWARTAL_ID_FK=KWARTAL.KWARTAL_ID AND
  9.     KWARTAL.ROK_ID_FK=ROK.ROK_ID AND
  10.     ROK.WARTOSC BETWEEN 2015 AND 2018 AND
  11.     USLUGA.TYP_USLUGI_ID_FK=TYP_USLUGI.TYP_USLUGI_ID AND
  12.     USLUGA.SALON_ID_FK=SALON.SALON_ID
  13. GROUP BY CUBE(SALON.NAZWA, TYP_USLUGI.NAZWA)
  14. ORDER BY SALON.NAZWA DESC;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top