0% found this document useful (0 votes)
13 views1 page

Scan Aug 26, 2020

The document outlines various SQL commands and operations related to a table named EXAM, which contains student information including names, subjects, stipends, and percentages. It includes tasks such as displaying specific student data, counting subjects, inserting new rows, and modifying existing data. Additionally, it specifies the need for output results from certain SQL queries related to stipend averages and student percentages.

Uploaded by

Krishna Saini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

Scan Aug 26, 2020

The document outlines various SQL commands and operations related to a table named EXAM, which contains student information including names, subjects, stipends, and percentages. It includes tasks such as displaying specific student data, counting subjects, inserting new rows, and modifying existing data. Additionally, it specifies the need for output results from certain SQL queries related to stipend averages and student percentages.

Uploaded by

Krishna Saini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

and output for (v) to (vii)

Table: EXAM

Subject Average Division


Name Stipend
Karan 400 English 68 FIRST
Aman 680 Mathematics 72 FIRST
FIRST
Javed 500 ACcounts 67
200 Informatics SS SECOND
Bishakh
Sugandha 400 History 35 THIRD
THIRD
Suparna | 550 | Geography 45
6 obtained Division FIRST in
To list the names of those students, who have
as
()
the ascending order of NAME.
received
(i) display a report listing NAME, SUBJECT and Annual stipend
To

assuming that the stipend column has monthly stipend.

the number of students, who have either accounts or informatics as


(ii) To count

subject.
(iv) To insert a new row in the table EXAM:
6,"Mohan",500,"English",73,"Second"
DIVISION="THIRD"
(v) SELECT AVG(Stipend) FROM EXAM WHERE
(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 Mysal for (i) to (IV) and Output for (v) to (Vii).
Table: EXAM.
Cisection Stream
Adno SName Percentage
90.2 12A Science
RO01 Sushant
RO02 Vaidyanath 80.5 12B Humanities
RO03 Miara 68.9 128 Science
RO04 Niara 96.0 |12A Commerce

|ROOS | Shinjini 88.9 12D Commerce


() 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 2% of all the humanities students.
(v) SELECT COUNT() FROM EXAM;
(vi) SELECT Sname, Percentage FROM EXAM WHERE Name LIKE "N6";
vil) sELECT ROUND(Percentage, 0) FROM EXAM WHERE Adno="RO0S";

You might also like