SQL SERVER

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3142117%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3ESQL%20SERVER%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3142117%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3EHello%2C%20I'm%20new%20to%20SQL%20and%20I'm%20having%20trouble%20with%20an%20exercise.%3CBR%20%2F%3EThe%20exercise%20is%20based%20on%20the%20attached%20data%20model.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%5C%26quot%3Blia-inline-image-display-wrapper%22%20lia-image-align-inline%3D%22%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fgxcuf89792%2F%5C%26quot%3Bhttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F346648i930ECBCCBB03FDE6%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%5C%26quot%3B%22%20role%3D%22%5C%26quot%3Bbutton%5C%26quot%3B%22%20title%3D%22Sem%20T%C3%ADtulo.png%22%20t%C3%ADtulo.png%3D%22%22%20alt%3D%22Sem%20T%C3%ADtulo.png%22%20%2F%3E%26lt%3B%5C%2Fspan%26gt%3B%3CBR%20%2F%3EThe%20question%20is%3A%3CBR%20%2F%3EWho%20(email)%20has%20never%20been%20to%20any%20show%20that%3CSPAN%3E%26nbsp%3B%26lt%3B%5C%2FSPAN%26gt%3B%3CA%20href%3D%22%5C%26quot%3Bmailto%3AEmail%22%20address%3D%22%22%20removed%3D%22%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EEmail%20address%20removed%26lt%3B%5C%2FA%26gt%3B%3CSPAN%3E%26nbsp%3B%26lt%3B%5C%2FSPAN%26gt%3Bhas%20not%20been%20to%3F%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EWhat%20did%20I%20do%20%3A%3CBR%20%2F%3ESELECT%20ticket.email%2C%20show.id_espetaculo%3CBR%20%2F%3EFROM%20ticket%20ticket%3CBR%20%2F%3EJOIN%20show%20show%3CBR%20%2F%3EON%20ticket.id_espetaculo%20%3D%20show.id_espetaculo%3CBR%20%2F%3EWHERE%20ticket.email%20!%3D%20'Email%20address%20removed'%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EThis%20shows%20me%20emails%20other%20than%20Rita's.%3CBR%20%2F%3EBut%20it%20doesn't%20tell%20me%20which%20one%20of%20them%20didn't%20go%20to%20the%20shows%20that%20she%20didn't%20go.%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
Visitor

s that she didn't go.

1 Reply

@sofiammelo , to be true, I don't understand your post/quession and the provided informations are to less, not of the tables in your ERD matches your post.

 

Please post table design as DDL, some sample data as DML statement and the expected result.