question

williamchenjun avatar image
williamchenjun asked

How to list all the soccer teams that have never lost against team X?

Hello, it's my first time here. I am a beginner at SQL and I've been having trouble solving this simple exercise.

I've been having trouble saying that if team Y has lost even one match against team X then it should not be selected and that only if team Y won all the matches against team X, it should be selected.

Thanks to everyone in advance.

sqldatabaseselect
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

It might help if you could provide some example source data and expected output

1 Like 1 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.