Hey there,I'm novice in MySQL Programming, just began to learn it two weeks ago, and I met a problem in an exercice my trainer gave.I had to create a Database classifying datas concerning the set up of musical meets. Here is a part of it in touch with my following question:AirDeJava dbo.GET_MEMBERS ID_MEMBER(PK, int, not NULL) ID_BAND(PK, int, not NULL) dbo.GROUPE ID_BAND(PK, int, not NULL) BANDNAME(varchar(30), NULL)
The aim of the exercise is to show the name of the bands and the number of members of the bands having more members than the average.Don't worry, I don't expect you to do the exercise in place of me (Don't take MY work
!). That's what I made first:SELECT COUNT(DISTINCT ID_MEMBER) As NUMBER_MEMBERSFROM GET_MEMBERSGROUP BY ID_BAND
I tried this next:SELECT AVG(NUMBER_MEMBERS) As MOYENNE_MEMBREFROM (SELECT COUNT(DISTINCT ID_MEMBER) As NUMBER_MEMBERSFROM GET_MEMBERS GROUP BY ID_BAND)
Obviously... That don't work.A helping hand could come like providance, I thank you beforehand. 