MySQL Forums
Forum List  »  MySQL Query Browser

error code 1248 ?? Help
Posted by: Floyd Wellershaus
Date: May 10, 2012 05:04AM

Hello,
I am trying to run the below sql, which keeps giving me error 1248, saying that every derived table must have it's own alias. I am struggling to understand to what they are referring. It seems to me, the derived does have an alias ( no_of_clubs )

Can you help me please ?
Thanks !
Floyd


SELECT COUNT(member_name) students
,no_of_clubs
FROM ( SELECT CONCAT(first_name,' ',last_name) member_name
,COUNT(club_name) no_of_clubs
FROM club_members
GROUP BY CONCAT(first_name,' ',last_name)
) dt
GROUP BY no_of_clubs
ORDER BY 2;

Options: ReplyQuote


Subject
Written By
Posted
error code 1248 ?? Help
May 10, 2012 05:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.