Advertisements
Advertisements
Question
Predict the output of the following query based on the table Sports given below:
Table: Sports
Sid | SName | Fees | DateofPlay | CoachId |
1 | Karate | 1200 | 2024-08-24 | S1 |
2 | Football | 1800 | 2024-09-13 | S2 |
3 | Cricket | 1500 | 2024-06-14 | S3 |
4 | Lawn Tennis | 2500 | 2024-09-25 | S4 |
5 | Badminton | 1800 | 2024-10-20 | S5 |
SELECT SUBSTR (CoachId,1) FROM Sports WHERE SName="Cricket" or Fees>=2000;
Short Answer
Solution
Output: S3
S4
Explanation:
For records where the SName column equals "Cricket" or the Fees column is greater than or equal to 2000, the supplied SQL query chooses the first character from the Coachld column of the Sports table.
shaalaa.com
Is there an error in this question or solution?
2023-2024 (February) Set 4