CBSE BOARD XII, asked by s158712bpalak04812, 17 days ago

Find the cities name with the condition and temperature from table 'whether' where condition = sunny or cloudy but temperature >= 60.

a) SELECT city, temperature, condition FROM weather WHERE condition = 'cloudy' AND condition = 'sunny' OR temperature >= 60

b) SELECT city, temperature, condition FROM weather WHERE condition = 'cloudy' OR condition = 'sunny' OR temperature >= 60

c) SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' AND temperature >= 60

d) SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' AND temperature >= 60​

Answers

Answered by maswanthmjagatheeshw
0

Explanation:

Answer: 3

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature >= 60

Explanation: We know that the AND operator gives the output only when both the first conditions are true. In contrast, the OR operator gives the output when either the first condition OR the second condition is true. Hence the option C is the correct choice.

Answered by syed2020ashaels
0

Answer:

Correct option is 3

Explanation:

SELECT CITY, THEME, AND CONDITION FROM THE WEATHER WHERE condition is'sunny' OR condition is 'cloudy' AND temperature is greater than 60

Explanation: We already know that the AND operator produces an output only when both of the first conditions are met. The OR operator, on the other hand, returns the result when either the first or second condition is true. As a result, option C is the correct choice.

SQL COUNT() is a function that returns the number of table records in the output.

This function is used in conjunction with the SQL SELECT statement.

Let's take a simple example: If you have a record of the voters in the selected area and want to count the number of voters, it is extremely difficult to do so manually, but you can easily do so by using the SQL SELECT COUNT query.

SELECT COUNT(*) function in SQL. To count and display data values, use the SQL SELECT statement in conjunction with the COUNT(*) function. The COUNT(*) function returns the total number of rows in the table.

For similar questions refer-https://brainly.in/question/34087180

#SPJ5

Similar questions