samedi 2 juillet 2016

I get the error ERROR Not unique table/alias

I can't figure out what's wrong with this query:

SELECT 
    user_master.user_id,
    user_master.business_id,
    user_master.user_name,
    user_master.lastname,
    user_master.user_type_id,
    user_master.group_id,
    GROUP_CONCAT(group_master.group_name) GroupName
FROM
    user_master
        JOIN
    group_master ON FIND_IN_SET(group_master.group_id,
            user_master.group_id)
        JOIN
    group_master ON group_master.group_id = user_master.group_id AND group_master.business_id = user_master.business_id
WHERE
    user_type_id = '3' AND user_master.business_id = '248' AND user_master.email_id <> '' AND user_master.user_name <> 'Test' AND user_master.lastname <> 'Learner' AND user_master.is_deleted = '0' AND user_master.is_active = '1'
GROUP BY user_master.user_id
order by user_master.user_name ASC

Upon execution I get the error ERROR Not unique table/alias.

Aucun commentaire:

Enregistrer un commentaire