adplus-dvertising
frame-decoration

Question

Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70F.

a.

SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' OR temperature > 70;

b.

SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' OR temperature > 70;

c.

SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' AND temperature > 70;

d.

SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' AND temperature > 70;

Posted under SQL DBMS

Answer: (c).SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' AND temperature > 70;

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70F.

Similar Questions

Discover Related MCQs

Q. Find all the tuples having temperature greater than 'Paris'.

Q. Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79

Q. Find the names of the countries whose condition is sunny.

Q. Find the name of all cities with their temperature, humidity and countries.

Q. Find the name of cities with all entries whose temperature is in the range of 71 and 89

Q. Which of the following query finds the names of the sailors who have reserved at least one boat?

Q. Which of the following query finds colors of boats reserved by "Dustin"?

Q. What does the following query find?

(SELECT DISTINCT r.sid
FROM boats b, reserves r
WHERE b.bid = r.bid
AND b.color = 'red')
MINUS
(SELECT DISTINCT r.sid
FROM boats b, reserves r
WHERE b.bid = r.bid
AND b.color = 'green')

Q. Which of the following query finds the name of the sailors who have reserved at least two boats?

Q. Which of the following query finds the total rating of the sailors who have reserved boat "103"?

Q. The SELECT statement SELECT 'Hi' FROM DUAL WHERE NULL = NULL; Outputs

Q. If a query involves NOT, AND, OR with no parenthesis

Q. Let the statement
SELECT column1 FROM myTable;
return 10 rows. The statement
SELECT ALL column1 FROM myTable;
will return

Q. Table employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE.
The SQL statement
SELECT COUNT(*) FROM employee WHERE SALARY > ALL (SELECT SALARY FROM EMPLOYEE);
prints

Q. Which of the following SQL commands can be used to add data to a database table?

Q. Which of the following join is also called as an 'inner-join'?

Q. The result of a SQL SELECT statement is a ________ .

Q. Which of the following query is correct for using comparison operators in SQL?

Q. How to select all data from student table starting the name from letter 'r'?

Q. Which of the following SQL query is correct for selecting the name of staffs from 'staffinfo' table where salary is 10,000 or 25,000?