Skip to content
Advertisement

Subqueries in MySQL

My first post here and I am desperate. Need this to complete the last 2 questions of my assignment.

This is the code I wrote and it is outputting almost what I need. The problem in the assignment wants to display Employees or Guests that are from Winnipeg or London. My code gives me all the cities for each employee and guest. I know I need to filter for Winnipeg and London with something like WHERE CityName IN ('London','Winnipeg') But I don’t know where it needs to go.

I also need to add that I cannot use JOIN or AND operators.

I know it might all sound confusing that is because it is to me so explaining my problem is not that simple. Thank you for the help.

Advertisement

Answer

there are some possibilies

Fro example

or

I also need to add that I cannot use JOIN or AND operators.

comma separated tables are another notation for CROSS JOIN, so that is a very stupid request

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement