Advertisement
Guest User

Untitled

a guest
Aug 13th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.62 KB | None | 0 0
  1. select min(placa_pod), max(placa_pod), max(placa_pod)-min(placa_pod) from pracownicy;
  2. select avg(placa_pod), etat from pracownicy group by etat order by 1 desc;
  3. select count(*) from pracownicy;
  4. select sum(placa_pod + IFNULL(placa_dod,0)), id_zesp from pracownicy group by id_zesp;
  5. select id_zesp, count(*) from pracownicy group by id_zesp having count(*) > 2 order by 2 desc;
  6. select avg(placa_pod), count(*), etat from pracownicy where zatrudniony > '1990-01-01' group by etat;
  7. select nazwisko, min(placa_pod) from pracownicy group by id_szefa sort by 2 desc;
  8. select id_prac from pracownicy group by id_prac having count(*) > 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement