Page 367 - Informatics_Practices_Fliipbook_Class12
P. 367
Section-D
31. Sonu is a database administrator in an organization where has maintained the following database table:
Table: MARKET
SHOP_NAME SALE AREA OPENING_DATE RATING CITY
Radha Gifts 250000.50 West 2010-10-21 C Delhi
Peter England 750000.45 South 1997-12-18 A Chennai
Rock On 300000.78 North 1998-09-21 B Amritsar
Sports King 380000.25 North 2008-09-18 B Baroda
Biswas Stores 450000.95 East 2004-03-15 A Dehli
Big Bazar 290000.45 South 2009-08-29 A Kolkata
Help him in writing SQL statements to perform the following:
a. Display shop name, area and sale after rounding off to zero decimal places.
b. Display the city names in upper case.
c. Display four characters from shop name starting from third character.
d. Display the year for the date of opening of shop.
32. Namit is the Data Scientist in XYZ company. He has to analyse the following DataFrame eventDF comprising the
event details organized by the company:
EVENT NO EVENT NAME LOCATION
A101 IT Quiz Building A
B102 Web Designing Building B
C103 Coding Building C
D104 App Designing Building A
E105 Poster Making Building B
i. What will be the output produced by the execution of the following statements?
a. print(eventDF["EVENT NAME"])
b. print(eventDF.loc[1:3])
ii. Write a Python statement to:
a. add a new column, noOfParticipants, with values of 25, 78, 96, 34, and 60.
b. display the location of the coding event.
OR
(Option for part iii only)
Write Python statement to delete the column No_Of_Participants from the DataFrame eventDF.
Section-E
33. Write SQL statements to perform the following operations:
(i) Retrieve the last 5 characters in uppercase from the string "life is fun".
(ii) To round off the number 453.345 up to two places.
(iii) To get the position of the letter LD from name of string 10 character.
th
Practice Paper 1 353

