
I want this watch

Select department is 1, if the affiliate ID have more corresponding ID on the back, not on the back of the affiliate ID is empty
I am not familiar with SQL, will only simple query and associated query always don't understand, ask everybody to help, very grateful