Re: Getting the result
I'm closer:
SELECT comm_name, COUNT(id_user) AS idu FROM (commerces_users
INNER JOIN commerces
ON id_comm = comm_id)
GROUP BY id_comm
HAVING COUNT(idu) = 1;
Now, I can get the commerces which have just one owner. Now, next step would be delete those commerces.... Could I add DELETE before SELECT? What do you think?
Subject
Written By
Posted
Re: Getting the result
May 27, 2015 01:38PM
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.