Preboard Question Paper IP CBSE
Preboard Question Paper IP CBSE
SECTION - C
(a) Consider the given table and write the following queries in MySQL :
Table : Sports
Sid SName Fees DateofPlay Coachld
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
(i) To display Sid and name of those sports which are to be played in the month of September.
(ii) To display all Sports names in lower case.
(iii) To display last two characters of all sports names whose fees is less than 1500.
OR
(b) Predict the output of the following queries based on the table Sports given above :
(i) SELECT UCASE (TRIM (SName)) FROM Sports Sid=5;
(ii) SELECT LEFT (SName, 3) FROM Sports DateofPlay>"“2024-09-13";
(iii) SELECT SUBSTR (CoachId,1) FROM Sports WHERE SName="“Cricket” or Fees>=2000;
27. Kabir, a data analyst, has stored the voter’s name and age in a dictionary.Now, Kabir wants to create a list of
dictionaries to store data of multiplevoters. He also wants to create a DataFrame from the same list of
dictionaries having appropriate row labels as shown below :
Voter_Name Voter_Age
Arl001 Arjun 35
Ba3002 Bala 23
Go4002 Govind 25
Dh4007 Dhruv 19
Na6005 Navya 18
Help Kabir in writing a Python program to complete the task.
28. Answer the following questions based on the table Salesman given below :
Table : Salesman
SECTION -D
31. Rupam created a MySQL table to store the details of Nobel prize winners. Help her to write the following
MySQL queries :
TABLE: NOBEL
Winner_Id YEAR SUBJECT WINNER COUNTRY CATEGO
RY
1001 1970 Physics Hannes Alfven Sweden Scientist
1002 1970 Physiology Bernard Katz NULL Scientist
1003 1970 Literature Aleksandr Solzhenitsyn Russia Linguist
1004 1971 Chemistry Gerhard Herzberg Germany Scientist
1005 1978 Peace Menachem Begin Israel Prime
Minister
1006 1987 Economics Robert Solow USA Economist
1007 1994 Literature Kenzaburo Oe Japan Linguist
(1) Display the names of Nobel Prize winner in ‘Literature’ for the year 1970.
(i) Display the subject and category of winners whose country is not known.
(iii) Display the details of all Nobel Prize winners who were Scientists.
(iv) Count total number of winners whose subject is Literature.
32. Ms. Ritika conducted an online assessment and stored the details in a DataFrame result as given below :
Table : Employee
Employee_id First_name Last_name Salary Joining_date Department
The management wants to connect all the divisions as well as all the computers of each division (H1, H2, H3
and H4). Distance between the divisions are as follows
Also give suitable Python statement to save this chart with the name, emission.png.