Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT BNO, city, street, tel_no
- FROM(
- SELECT A.*, B.bno, B.street, B.city, B.tel_no
- FROM BranchVSHKL B, (
- SELECT bno AS StaffBNO, COUNT(sno) AS Personnel
- FROM StaffVSHKL
- GROUP BY bno
- ) A
- WHERE Personnel = (
- SELECT MAX(Personnel)
- FROM
- (
- SELECT bno AS StaffBNO, COUNT(sno) AS Personnel
- FROM StaffVSHKL
- GROUP BY bno
- )
- ) AND StaffBNO = B.bno
- );
- /*
- BNO CITY STREET TEL_NO
- ----- -------- ------------- ------------
- 1332 Minsk Kabushkina 375296954454
- 1325 Minsk Timiryazeva 375296545454
- 1346 Minsk Pritytskogo 375296651754
- 1367 Grodno Kirova 375296541004
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement