Please share sample codes in text format. You can achieve the result by below query
with Artist as (
select recording_artist_id,artist_name,
(select count(*) from album,song,musical_genre mg
where album.album_id=song.album_id and mg.musical_genre_id=album.musicalgenre_id...