Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

sql select question

msugradusmsugradus Member Posts: 2
I have attached the table information




I need to display the persons name and leaders name where the person
has a MTDRank >=3 and their leader has to have MTDRank >=3. So in this case i need the results to be:

Mark Placid 2222 Phil simmon 543

Comments

  • Termc1224Termc1224 Member Posts: 84
    : I have attached the table information
    :
    :
    :
    :
    : I need to display the persons name and leaders name where the person
    : has a MTDRank >=3 and their leader has to have MTDRank >=3. So in
    : this case i need the results to be:
    :
    : Mark Placid 2222 Phil simmon 543
    :
    :
    try this but it will only show mark placid coz phil simmon has an mtd of more than 3 but his lider has not. double check it, so heres the query

    SELECT Customer.fname AS Expr1, Customer.lname AS Expr2, Customer.id AS Expr3 FROM Rank INNER JOIN Customer ON Rank.ID = Customer.id WHERE (Customer.leaderid IN (SELECT id FROM rank WHERE mtdrank >= 3)) AND (Customer.id IN (SELECT id FROM rank WHERE mtdrank >= 3))

    double check the field also i might have written them different from what your field is. hope to help


    I'm the best there is,
    the best there was,
    and the best there ever will be.
    hahahahaha lolz :)
Sign In or Register to comment.