0% found this document useful (0 votes)
57 views8 pages

Xii Ip HHW

Uploaded by

2858keshvi8b
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)
57 views8 pages

Xii Ip HHW

Uploaded by

2858keshvi8b
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
You are on page 1/ 8

SUMMER HOLIDAY HOMEWORK

Class XII : Informatics Practices (065)

Q1. Write the output produced by the following SQL commands:

(a) SELECT POW(4,3), POW(3,4);

(b) SELECT ROUND(543.5694,2), ROUND(543.5694), ROUND (543.5694,-1);

(c) SELECT MOD (4,5), MOD(81,9), MOD(45,6);

(d) SELECT LENGTH("Prof. M. L. Sharma");

(e) SELECT CONCAT("Naveen", Gupta") "FULL NAME";

(f) SELECT YEAR (CURDATE()), MONTH(CURDATE()), DAY (CURDATE());

(g) SELECT DAYOFYEAR(CURDATE()), DAYOFMONTH(CURDATE()), DAYNAME


(CURDATE());

(h) SELECT LEFT("Unicode",3), RIGHT("Unicode",4);

(1) SELECT INSTR("UNICODE","CO"), INSTR("UNICODE","CD");

(j) SELECT MID("Informatics",3,4), SUBSTR("Practices",3);

Q2. write SQL statements for the following.

1. To print the current date and time.


2. To print the today's date only.
3. To print the month name from the date "2019- 10-10".
4. To the month from the date "2020-01-10"
5. To print the square of 5.
6. To round of the number 345.56 upto 1 decimal place.
7. To print the modulus of 4 to 5.
8. To round of the number 4567.10 multiple of 10.

Q3. Assuming the given text "Informatics Practices Class-XII", write the SQL statements to
do the following:

(i) To print the length of the above string.

(ii) To extract "mat" from the string.

(iii) To print extract "xii" and print it in upper case.

(iv) To print above complete string in upper case.

(v) To print "info" in lower case.

(vi) To check whether "ces" is available in the above string or not.


(vii) To remove the leading and trailing spaces.

4.Create the following table named "Charity" and write SQL queries for the tasks that follow

Table: Charity

(i) Display all first names in lowercase.

(ii) Display all last names of people of Mumbai city in uppercase.

(iii) Display Person Id along with First 3 characters of his/her name.

(iv) Display first name concatenated with last name for all the employees.

(v) Display length of address along with Person Id.

(vi) Display last 2 characters of City and Person ID.

(vii) Display Last Names and First names of people who have "at" in the second or third
position in therto

(viii) Display the position of 'a' in Last name in every row.

(ix) Display Last Name and First name of people who have "a" as the last character in their
First names

(x) Display the first name and last name concatenated after removing the leading and trailing
blanks

(xi) Display Person Id, last names and contribution rounded to the nearest rupee of all the
persons
(xii) Display Person Id, last name and contribution with decimal digits truncated of all the
persons

(xiii) Display Last name, contribution and a third column which has contribution divided by
10. Round it points.

32. Consider the table "Grocer" and write SQL queries for the tasks that follow:
( Unit price is Per Kg. Price)
(i) Display Item name, unit price along with Date of purchase for all the Items.

(i) Display Item name along with Month (in number) when it was purchased for all the items

(iii) Display Item name along with year in which it was purchased for all the items.

(iv) Display Item Id , Date of Purchase and day name of week (e.g. Monday) on which it was
purchased.

(v) Display names of all the items that were purchased on Mondays or Tuesdays.

(Vi) Display the day name of the week on which Rice was purchased.

(vii) Display the Item name and unit price truncated to integer value (no decimal digits) of all
the items.

Consider the following table schooldata:

Write SQL queries for the following:

(1) Display the average Marks secured by each Gender.

(1) Display the minimum Marks secured by the students of Grade 10.
(ii) Display the total number of students in each Club where number of students are more
than 1.

(ii) Display the maximum and minimum marks secured by each gender

(a) Based on these tables write SQL statements for the following queries:

(1) Display the lowest and the highest classes from the table STUDENTS.

(i) Display the number of students in each class from the table STUDENTS.

(iii) Display the number of students in class 10.


(iv) Display details of the students of Cricket team.

(V) Display the Admission number, name, class, section, and roll number of the students
whose grade in Sports table is 'A'.

(vi) Display the name and phone number of the students of class 12 who are play some
game.

(vii) Display the Number of students with each coach.

(vii) Display the Number of students with each coach.

(viii) Display the names and phone numbers of the students whose grade is 'A' and whose
coach is Narendra.

(b) Identify the Foreign Keys (if any) of these tables. Justify your Choices.
(a) Based on these tables write SQL statements for the following queries:

(i) Display the average rate of a South Indian item.

(ii) Display the number of items in each category.

(iii) Display the total quantity sold for each item.

(iv) Display total quantity of each item sold but don't display this data for the items
whose total quantity sold is less than 3.

(v) Display the details of bill records along with Name of each corresponding item.

(vi) Display the details of the bill records for which the item is 'Dosa'.

(vii) Display the bill records for each Italian item sold.

(viii) Display the total value of items sold for each bill.

(b) Identify the Foreign Keys (if any) of these tables. Justify your answer.
Help him in writing SQL queries to the perform the following task:

(a) Insert a new record in the table having following values: [6.'Khushi','CS',85]

(b) To change the value "IP" to "Informatics Practices" in subject column.

(c) To remove the records of those students whose marks are less than 30.

(d) To add a new column Grade of suitable datatype.

(e) To display records of "Informatics Practices" subject.

The company is planning to form a network by joining these blocks.

(a) Out of the four blocks on campus, suggest the location of the server that will provide the
best connectivity. Explain your response.

(b) For very fast and efficient connections between various blocks within the campus,
suggest a suitable topology and draw the same.

(c) Suggest the placement of the following devices with justification


(i) Repeater

(ii) Hub/Switch

(d) VoIP technology is to be used which allows one to make voice calls using a broadband
internet connection. Expand the term VoIP.

(e) The XYZ Media House intends to link its Mumbai and Delhi centers. Out of LAN, MAN, or
WAN, what kind of network will be created? Justify your answer.

You might also like