1 Crore+ students have signed up on EduRev. Have you? Download the App |
In SQL, like condition allows you to use wild card characters to perform matching. Which of the following is a valid wild card character?
Consider the schema
Sailors(sid, sname, rating, age) with the following data
For the query
SELECT S.rating, AVG(S.age) AS avgage FROM Sailors S
Where S.age >= 18
GROUP BY S.rating
HAVING 1 < (SELECT COUNT(*) FROM Sailors S2 where S.rating = S2.rating)
The number of rows returned is
Which of the following statements are TRUE about an SQL query?
P: An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
Q: An SQL query can contain a HAVING clause only if it has a GROUP BY clause
R: All attributes used in the GROUP BY clause must appear in the SELECT clause
S: Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
62 videos|66 docs|35 tests
|
62 videos|66 docs|35 tests
|