Answer:
i) Display the details of all Science students.
SELECT * FROM MARKS WHERE STREAM = 'Science';
ii) Display the details of students who are in class 12 sorted by stipend.
SELECT * FROM MARKS WHERE CLASS = 12 ORDER BY STIPEND;
iii) This query selects only the SNAME and GRADE columns from the MARKS table where the SNAME ends with the letter "S". The "%" sign is used as a wildcard to match any characters before the letter "S". This will display the SNAME and GRADE of all students whose names end with "S".
iv)This query updates the STIPEND column of the MARKS table, doubling the stipend value for all the students who have a GRADE of 'C'.
v)This query selects only the STREAM and AVGMARK columns from the MARKS table where the AVGMARK is greater than 90. This will display the STREAM and AVGMARK of all the students who have an average mark greater than 90.
Step-by-step explanation:
Assuming the MARKS table has columns: ID, SNAME, CLASS, STREAM, STIPEND, GRADE, and AVGMARK, the SQL queries for the given questions are:
i) Display the details of all Science students.
SELECT * FROM MARKS WHERE STREAM = 'Science';
This query selects all the columns from the MARKS table where the STREAM is Science. This will display the details of all Science students.
ii) Display the details of students who are in class 12 sorted by stipend.
SELECT * FROM MARKS WHERE CLASS = 12 ORDER BY STIPEND;
This query selects all the columns from the MARKS table where the CLASS is 12 and sorts the result by STIPEND in ascending order. This will display the details of students who are in class 12 sorted by stipend.
iii) SELECT SNAME, GRADE FROM MARKS WHERE SNAME LIKE “%S” ;
This query selects only the SNAME and GRADE columns from the MARKS table where the SNAME ends with the letter "S". The "%" sign is used as a wildcard to match any characters before the letter "S". This will display the SNAME and GRADE of all students whose names end with "S".