Find all the tuples having temperature greater than 'Paris'.
A. SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE city = 'Paris')
B. SELECT * FROM weather WHERE temperature > (SELECT * FROM weather WHERE city = 'Paris')
C. SELECT * FROM weather WHERE temperature > (SELECT city FROM weather WHERE city = 'Paris')
D. SELECT * FROM weather WHERE temperature > 'Paris' temperature
Answer: Option A
Solution(By Examveda Team)
To find all the tuples (rows) in the "weather" table where the temperature is greater than the temperature in Paris, you should use the SQL query SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE city = 'Paris') (Option A). This query correctly uses a subquery to first select the temperature in Paris and then compares it with the temperatures in other cities. If the temperature in a city is greater than that of Paris, the row is included in the result set. This is why Option A is the correct choice.Join The Discussion
Comments ( 3 )
A. Structured Query Language
B. Structured Query List
C. Simple Query Language
D. None of these
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
A. Data Definition Language(DDL)
B. Data Manipulation Language(DML)
C. Both of above
D. None
Which operator performs pattern matching?
A. BETWEEN operator
B. LIKE operator
C. EXISTS operator
D. None of these
What operator tests column for the absence of data?
A. EXISTS operator
B. NOT operator
C. IS NULL operator
D. None of these
Here the temperature is not mentioned directly but mentioned it's a city so first, we should write a subquery to select the temperature of Paris and then we should compare it to the other cities' temperatures to get the resultant tuples.....Thank you
detail please
how