Sajmon

lol

Apr 9th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.36 KB | None | 0 0
  1. select Z.id_zamestnanca, Z.meno, Z.priezvisko from Zamestnanec as Z
  2. join Faktúra as F on (Z.id_zamestnanca = F.id_zamestnanca)
  3. group by Z.id_zamestnanca, Z.meno, Z.priezvisko
  4. having COUNT(F.id_zamestnanca) > select COUNT(Za.id_zamestnanca) from Zamestnanec as Za
  5. join Faktúra as Fa on (Za.id_zamestnanca = Fa.id_zamestnanca) where (Za.id_zamestnanca = 'JAP003')
Advertisement
Add Comment
Please, Sign In to add comment