ExamVeda
Login
Home
This question belongs to SQL Sql Miscellaneous
Sql Miscellaneous
?

Find the names of the countries whose condition is sunny.

Answer & Solution
Correct Answer: Option B
To find the names of countries where the condition is "sunny," you should use the SQL query SELECT country FROM location WHERE city IN (SELECT city FROM weather WHERE condition = 'sunny'); (Option B). This query correctly uses a subquery to first select the cities with a "sunny" condition from the "weather" table and then matches those cities to the "city" column in the "location" table to determine the corresponding countries. Option B is the appropriate choice for obtaining the desired result.
Examveda
Question posted by Examveda
Community

Join the Discussion

11 Comments
Manikanta Simal
Manikanta Simal 4 years ago
option A is correct because city is not mention in question
Naveena Jakka
Naveena Jakka 4 years ago
Option A is also valid...
Rafi Ullah
Rafi Ullah 5 years ago
You just replace City with country in syntax, simple.
Ahmed Raafat
Ahmed Raafat 6 years ago
option A is also valid because it wasn't mentioned in the question that the 'condition' column is existed in another table!
Ahmed Raafat
Ahmed Raafat 6 years ago
option A is also valid because it wasn't mentioned in the question that the 'condition' column is existed in another table!
Muhammad Najam-us-saqib
Muhammad Najam-us-saqib 7 years ago
Option B is invalid as the question asks for the names of all the countries, not cities
Yogita Chawariya
Yogita Chawariya 9 years ago
option A is also valid as city is not mentioned any where in the question.

Yogita Chawariya
Yogita Chawariya 9 years ago
option A is all valid as city is not mentioned any where in the question.

Ganesh Apune
Ganesh Apune 10 years ago
The option b is the wrong answer because the in this condition written as = sunny'
Manzar Iqbal
Manzar Iqbal 10 years ago
Here it is no specified that the condition can be found from cities only. Hence the first option is simple and correct in my opinion.
Sakshi Maheshwari
Sakshi Maheshwari 11 years ago
i think option one is right bcoz the query says the country condition should be sunny ..it doesn't ask to check for city condition..
or on the other way aroud i think this is an ambiguous query.