MySQL Forums
Forum List  »  Newbie

SOLVED: Using SELECT within SELECT in mysql query
Posted by: Daniel Le Breton
Date: March 22, 2013 07:48AM


finaly, the request is :
thank you.

FROM regroupement_item ri3
INNER JOIN regroupement rg3 ON rg3.regroupement_id = ri3.regroupement_id
INNER JOIN regroupement_item ri4 ON ri4.regroupement_id = rg3.regroupement_id
LEFT JOIN (SELECT rg1.regroupement_id, ri.item
FROM regroupement rg1
INNER JOIN regroupement_item ri ON rg1.regroupement_id = ri.regroupement_id
INNER JOIN regroupement_item ri2 ON ri2.item=ri.item
INNER JOIN regroupement rg2 ON rg2.regroupement_id = ri2.regroupement_id
WHERE rg1.regroupement_type = 1 AND rg2.regroupement_type = 2) gg ON gg.item = ri4.item
WHERE rg3.regroupement_type = 2 AND ri3.item != ri4.item AND gg.item IS NULL

Edited 1 time(s). Last edit at 03/22/2013 08:13AM by Peter Brawley.

Options: ReplyQuote

Written By
SOLVED: Using SELECT within SELECT in mysql query
March 22, 2013 07:48AM

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.