rozman50

TAZAJEBANA NALOGA

Jun 12th, 2020
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.26 KB | None | 0 0
  1. CREATE OR REPLACE VIEW temp AS
  2. SELECt k.naziv, COUNT(*) as stevilo
  3. FROM oseba o
  4. INNER JOIN naslov n ON o.fk_naslov = n.id_naslov
  5. INNER JOIN kraj k ON k.id_kraj = n.id_kraj_tk
  6. GROUP BY k.id_kraj;
  7.  
  8. SELECT * from temp
  9. WHERE stevilo = (SELECT MAX(stevilo) FROM temp);
Add Comment
Please, Sign In to add comment