SELECT a.albumID,a.albumName,a.albumShot,COUNT(b.galleryID) AS CountgalleryID
FROM album a , gallery b
WHERE a.albumID = b.albumID
GROUP BY a.albumID,a.albumName,a.albumShot
ORDER BY a.albumID ASC
SELECT b.GalleryID,b.GalleryName,b.GalleryShot,COUNT(b.GalleryID) AS CountGalleryID
FROM gallery b , album a
WHERE b.AlbumID = a.AlbumID
GROUP BY b.GalleryID,b.GalleryName,b.GalleryShot ORDER BY b.AlbumID ASC
SELECT a.albumID,a.albumName,a.albumShot,COUNT(b.galleryID) AS CountgalleryID
FROM album a , gallery b
WHERE a.albumID = b.albumID
GROUP BY a.albumID,a.albumName,a.albumShot
ORDER BY a.albumID ASC