Explain select UserID from Team_enewsmember where Agentid in (select UserID from Team_enewsmember where agentid= ' 2 ' and Lev Elid>=1 GROUP by UserID) and Levelid>=1 GROUP by UserID
The Using where is present if the primary key UserID and the Agentid Federated Index. Using Index
Why not go away with the Using where; Using Filesort, please expert guidance.
Reply to discussion (solution)
UserID is the primary key, why do you want GROUP by UserID??
The primary key must be unique, and then the group will be superfluous.
UserID is the primary key, why do you want GROUP by UserID??
The primary key must be unique, and then the group will be superfluous.
Thanks, ha! When removed, only the using where is
Ask again how to use inner join or left join to get the above query and query results.
What does the query result mean?
Inner JOIN and left join have different result sets, cannot be used or tied up
What does the query result mean?
Inner JOIN and left join have different result sets, cannot be used or tied up
MySQL subquery statement changed to INNER join or left join
Only to find out that you're on the same watch.
Is it okay to connect from there?
Only to find out that you're on the same watch.
Is it okay to connect from there?
Is the same table, how to write to this situation from the connection, trouble to give an example. I wrote a No, so it is useless.
That's a general idea.
Select UserID from team_enewsmember A, team_enewsmember b where A.agentid=b.userid and b.agentid= ' 2 ' and B.levelid>=1 and A.levelid>=1
That's a general idea.
Select UserID from team_enewsmember A, team_enewsmember b where A.agentid=b.userid and b.agentid= ' 2 ' and B.levelid>=1 and A.levelid>=1
Select A.userid from Team_enewsmember as a,team_enewsmember as B where A.userid=b.userid and b.agentid= ' 2 ' and B.LEVELID&G T;=1
Select
A.UserID Thank you! This can be, the third level node and the fourth level how to check, the third level of self-connection as a subquery?
First node of 2 3
3 of the first node 4,
First node of 4 5
Are you checking the cascade data? That should be recursive, or modify the data structure
If it's just a fixed level 4, it's okay.
Are you checking the cascade data? That should be recursive, or modify the data structure
If it's just a fixed level 4, it's okay.
Yes, other data related to each level of userid needs to be queried based on the identified UserID. But that's fine, thanks, huh!