Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate solution to 12(Not an Issue) #12

Open
Rufaid786 opened this issue Feb 23, 2023 · 0 comments
Open

Alternate solution to 12(Not an Issue) #12

Rufaid786 opened this issue Feb 23, 2023 · 0 comments

Comments

@Rufaid786
Copy link

select b.name as "Band Name",s."Number of songs" from bands as b inner join(select a.band_id as "id",count(s.length) as "Number of songs" from albums as a inner join songs as s on a.id=s.album_id group by a.band_id) as s on b.id=s.id;

Please try with the query given inside the inner join first and then do the rest for easy understanding from beginner point of view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant