0% found this document useful (0 votes)
2 views

Scan Aug 24, 2020

The document provides a series of MySQL commands for manipulating and querying a table named EXAM, which contains student data. It includes tasks such as listing students with a specific division, calculating averages, inserting new records, and modifying existing data. Additionally, it outlines commands for another EXAM table focusing on student percentages and includes various selection and update queries.

Uploaded by

Krishna Saini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Scan Aug 24, 2020

The document provides a series of MySQL commands for manipulating and querying a table named EXAM, which contains student data. It includes tasks such as listing students with a specific division, calculating averages, inserting new records, and modifying existing data. Additionally, it outlines commands for another EXAM table focusing on student percentages and includes various selection and update queries.

Uploaded by

Krishna Saini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

29. Consider the table EXAM given below.

Write commands in MySql for(i) to (fiv)


and output for (v) to (vi)
Table: EXAM
No Name Stipend Subject Average Division
Karan 400 English 68 FIRST
2 Aman 680 Mathematics 72 FIRST
Javed 500 67 FIRST
Accounts
Bishakh 200
Informatics 55 SECOND
400 35 THIRD
Sugandha History
Suparna S50 Geography |45 THIRD
(i) To list the names of those students, who have obtained Division as FIRST in
the ascending order of NAME.
(i) To display a report listing NAME, SUBJECT and Annual stipend received
assuming that the stipend column has monthly stipend.

(ii) To count the number of students, who have either accounts or informatics as
subject.
(iv) To insert a new row in the table EXAM:
6,"Mohan"500,"English",73,"Second"
(v) SELECT AVG(Stipend) FROM EXAM WHERE DIVISION="THIRD"
(vi) SELECT COUNT(DISTINCT Subject) FROM EXAM;
(vi) SELECT MIN(Average) FROM EXAM WHERE Subject="English":

30. Consider the following table names EXAM with details of marks. Rite
command of MysQl for (i) to (1V) and Output for (v) to (Vii).
Table: EXAM.
Adno SName Percentage Clsection Stream
RO01 Sushant 90.2 12A Science
RO02 Vaidyanath 80.5 128 Humanities
RO03 Miara 68.9 12B Science
RO04 Niara 96.0 12A Commerce
ROOS Shinjini 88.9 12D Commerce
i) To display all information of the students of humanities in descending order
of percentage.
(i) To display Adno, Name, Percentage and Stream of those students whose
name is less than 6 characters long.
(i) To add another column Bus)Fees with datatype and size as decimal (8,2).
(iv) To increase percentage by 29% of all the humanities students.
(v) SELECT COUNT(") FROM EXAM;
(vi) SELECT Sname, Percentage FROM EXAM WHERE Name LIKE "N%";
(vil) SELECT ROUND(Percentage,0) FROM EXAM WHERE Adno="ROO5";

You might also like