Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- postgres=# SELECT imie, nazwisko, autorzy_290894.adres FROM autorzy_290894 INNER
- JOIN wydawnictwa_290894 ON autorzy_290894.adres = wydawnictwa_290894.adres;
- postgres=# SELECT tytID, tytul, nazwa, wydawnictwa_290894.wydID FROM tytuly_2908
- 94 INNER JOIN wydawnictwa_290894 ON tytuly_290894.wydID = wydawnictwa_290894.wyd
- ID;
- postgres=# SELECT imie, nazwisko, COUNT(tytul_autor_290894.tytID) FROM autorzy_2
- 90894 INNER JOIN tytul_autor_290894 ON autorzy_290894.auID = tytul_autor_290894.
- auID GROUP BY imie, nazwisko;
- postgres=# SELECT tytul, cena*sprzedanych AS dochod, tytul_autor_290894.zaliczka
- FROM tytuly_290894 INNER JOIN tytul_autor_290894 ON tytuly_290894.tytID = tytul
- _autor_290894.tytID WHERE cena*sprzedanych > 10*zaliczka;
- postgres=# SELECT tytul, COUNT(tytul_autor_290894.auID) FROM tytuly_290894 RIGHT
- JOIN tytul_autor_290894 ON tytuly_290894.tytID = tytul_autor_290894.tytID GROUP
- BY tytul HAVING COUNT(auID) > 1;
- postgres=# SELECT imie, nazwisko FROM autorzy_290894 LEFT OUTER JOIN tytul_autor
- _290894 ON autorzy_290894.auID = tytul_autor_290894.auID WHERE tytul_autor_29089
- 4.tytID IS NULL;
- postgres=# SELECT imie, nazwisko, tytuly_290894.tytul FROM autorzy_290894 LEFT O
- UTER JOIN tytul_autor_290894 ON autorzy_290894.auID = tytul_autor_290894.auID IN
- NER JOIN tytuly_290894 ON tytul_autor_290894.tytID = tytuly_290894.tytID;
- postgres=# SELECT imie, nazwisko, tytuly_290894.tytul, wydawnictwa_290894.nazwa
- FROM autorzy_290894 LEFT OUTER JOIN tytul_autor_290894 ON autorzy_290894.auID =
- tytul_autor_290894.auID INNER JOIN tytuly_290894 ON tytul_autor_290894.tytID = t
- ytuly_290894.tytID INNER JOIN wydawnictwa_290894 ON tytuly_290894.wydID = wydawn
- ictwa_290894.wydID;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement