Visitorid Visitorname Gender Comingfrom Amountpaid
Visitorid Visitorname Gender Comingfrom Amountpaid
Visitorid Visitorname Gender Comingfrom Amountpaid
Q2. Write SQL Queries for a) to c) and write output for d) to e) based on the following table [4]
Table: Visitor
VisitorID VisitorName Gender ComingFrom AmountPaid
1 Suman F Kanpur 2500
2 Indu F Lucknow 3000
3 Rachana F Varanasi 2000
4 Vikram M Kanpur 4000
5 Rajesh M Kanpur 3000
6 Suresh M Prayagraj 3600
7 Dinesh M Lucknow 4200
8 Shikha F Varanasi 5000
a) Write a query to display VisitorName, ComingFrom details of Female visitor with amount paid
more than 3000.
c) To display all details of visitors in order of their AmountPaid from highest to lowest.
Q1. Write a Python program to implement stack operations using List. [2]
Q2.Write SQL Queries for i) to iii) and write output for iv) to v) based on the following table [4]
Table: STUDENT
SNO NAME STREAM FEES AGE SEX
(i) List the name of all the students who have taken stream as COMPUTER.
(ii) To count the number of female students.
(iii) To display all the records in sorted order of name.
(iv) SELECT COUNT (DISTINCT STREAM) FROM STUDENT;
(v) SELECT SUM(FEES) FROM STUDENT GROUP BY STREAM;