Xii Ip HHW
Xii Ip HHW
Q3. Assuming the given text "Informatics Practices Class-XII", write the SQL statements to
do the following:
4.Create the following table named "Charity" and write SQL queries for the tasks that follow
Table: Charity
(iv) Display first name concatenated with last name for all the employees.
(vii) Display Last Names and First names of people who have "at" in the second or third
position in therto
(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.
(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.
(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.
(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:
(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]
(c) To remove the records of those students whose marks are less than 30.
(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.
(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.