हिंदी

NCERT solutions for इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ chapter 1 - Querying and SQL Functions [Latest edition]

Advertisements

Chapters

NCERT solutions for इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ chapter 1 - Querying and SQL Functions - Shaalaa.com
Advertisements

Solutions for Chapter 1: Querying and SQL Functions

Below listed, you can find solutions for Chapter 1 of CBSE NCERT for इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२.


Intext QuestionsExercise
Intext Questions [Pages 7 - 15]

NCERT solutions for इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ 1 Querying and SQL Functions Intext Questions [Pages 7 - 15]

Activity 1.1

1.Page 7

Using the table SALE of CARSHOWROOM database, write SQL queries for the following:

  1. Display the InvoiceNo and commission value rounded off to zero decimal places.
  2. Display the details of SALE where payment mode is credit card..

Activity 1.2

2.Page 9

Using the table INVENTORY from CARSHOWROOM database, write SQL queries for the following:

  1. Convert the CarMake to uppercase if its value starts with the letter ‘B’.
  2. If the length of the car’s model is greater than 4 then fetch the substring starting from position 3 till the end from attribute Model.

Activity 1.3

3.Page 10

Using the table EMPLOYEE from CARSHOWROOM database, write SQL queries for the following:

  1. Display employee name and the last 2 characters of his EmpId.
  2. Display designation of employee and the position of character ‘e’ in designation, if present.

Activity 1.4

4.Page 11

Using the table EMPLOYEE of CARSHOWROOM database, list the day of birth for all employees whose salary is more than 25000.

Think and Reflect

1.Page 12

Can we use arithmetic operators (+, −. *Can we use arithmetic operators (+, −. *, or /) on date functions?, or /) on date functions?

Activity 1.5

a)Page 14

Find sum of Sale Price of the cars purchased by the customer having ID C0001 from table SALE.

b)Page 14

Find the maximum and minimum commission from the SALE table.

Activity 1.6

a)Page 15

List the total number of cars sold by each employee.

b)Page 15

List the maximum sale made by each employee.

Exercise [Pages 23 - 25]

NCERT solutions for इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ 1 Querying and SQL Functions Exercise [Pages 23 - 25]

1. a)Page 23

Define RDBMS. Name any two RDBMS software.

1. b) i)Page 23

What is the purpose of the following clause in a select statement?

ORDER BY

1. b) ii)Page 23

What is the purpose of the following clauses in a select statement?

HAVING

1. c)Page 23

Site any two differences between Single Row Functions and Aggregate Functions.

1. d)Page 23

What do you understand by Cartesian Product?

1. e) i)Page 23

Write the name of the functions to perform the following operation:

To display the day like “Monday”, and “Tuesday”, from the date when India got independence.

1. e) ii)Page 23

Write the name of the functions to perform the following operation:

To display the specified number of characters from a particular position of the given string.

1. e) iii)Page 23

Write the name of the functions to perform the following operation:

To display the name of the month in which you were born.

1. e) iv)Page 23

Write the name of the functions to perform the following operation:

To display your name in capital letters.

2. a)Page 23

Write the output produced by the following SQL statement:

SELECT POW(2, 3);

2. b)Page 23

Write the output produced by the following SQL statement:

SELECT ROUND(123.2345, 2),
ROUND(342.9234, −1);

2. c)Page 23

Write the output produced by the following SQL statement:

SELECT LENGTH("Informatics Practices");

2. d)Page 23

Write the output produced by the following SQL statement:

SELECT    YEAR(“1979/11/26”),
MONTH(“1979/11/26”),    DAY(“1979/11/26”), MONTHNAME(“1979/11/26”);

2. e)Page 24

Write the output produced by the following SQL statement:

SELECT    LEFT("INDIA", 3),    RIGHT("Computer Science", 4), 

2. f)Page 24

Write the output produced by the following SQL statement:

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

3.Page 24

Consider the following table named “Product”, showing details of products being sold in a grocery shop.

PCode PName UPrice Manufacturer
P01 Washing Powder 120 Surf
P02 Toothpaste 54 Colgate
P03 Soap 25 Lux
P04 Toothpaste 65 Pepsodent
P05 Soap 38 Dove
P06 Shampoo 245 Dove

Write SQL queries for the following:

  1. Create the table Product with appropriate data types and constraints.
  2. Identify the primary key in the Product.
  3. List the Product Code, Product Name, and price in descending order of their product name. If PName is the same, then display the data in ascending order of price.
  4. Add a new column Discount to the table Product.
  5. Calculate the value of the discount in the table Product as 10 percent of the UPrice for all those products where the UPrice is more than 100, otherwise, the discount will be 0.
  6. Increase the price by 12 percent for all the products manufactured by Dove.
  7. Display the total number of products manufactured by each manufacturer. Write the output(s) produced by executing the following queries on the basis of the information given above in the table Product:
  8. SELECT PName, Average (UPrice) FROM Product GROUP BY Pname;
    i) SELECT DISTINCT Manufacturer FROM Product;
    j) SELECT COUNT (DISTINCT PName) FROM Product;
    k) SELECT PName, MAX(UPrice), MIN(UPrice) FROM Product GROUP BY PName;
4.Page 25

Using the CARSHOWROOM database given in the chapter, write the SQL queries for the following:

  1. Add a new column Discount in the INVENTORY table.
  2. Set appropriate discount values for all cars keeping in mind the following:
    (i) No discount is available on the LXI model.
    (ii) VXI model gives a 10 percent discount.
    (iii) A 12 percent discount is given on cars other than the LXI model and VXI model.
  3. Display the name of the costliest car with the fuel type “Petrol”.
  4. Calculate the average discount and total discount available on Baleno cars.
  5. List the total number of cars having no discount.
5.Page 25

Consider the following tables Student and Stream in the Streams_of_Students database. The primary key of the Stream table is StCode (stream code) which is the foreign key in the Student table. The primary key of the Student table is AdmNo (admission number).

AdmNo  Name StCode
211 Jay NULL
241 Aditya S03
290 Diksha S01
333 Jasqueen S02
356 Vedika S01
380 Ashpreet S03

 

StCode Stream
S01 Science
S02 Commerce
S03 Humanities

Write SQL queries for the following:

  1. Create the database Streams_Of_Students.
  2. Create the table Student by choosing appropriate data types based on the data given in the table.
  3. Identify the Primary keys from tables Student and Stream. Also, identify the foreign key from the table Stream.
  4. Jay has now changed his stream to Humanities. Write an appropriate SQL query to reflect this change.
  5. Display the names of students whose names end with the character ‘a’. Also, arrange the students in alphabetical order.
  6. Display the names of students enrolled in Science and Humanities stream, ordered by student name in alphabetical order, then by admission number in ascending order (for duplicating names).
  7. List the number of students in each stream having more than 1 student.
  8. Display the names of students enrolled in different streams, where students are arranged in descending order of admission number.
  9. Show the Cartesian product on the Student and Stream table. Also mention the degree and cardinality produced after applying the Cartesian product.
  10. Add a new column ‘TeacherIncharge” in the Stream table. Insert appropriate data in each row.
  11. List the names of teachers and students.
  12. If Cartesian product is again applied on Student and Stream tables, what will be the degree and cardinality of this modified table?

Solutions for 1: Querying and SQL Functions

Intext QuestionsExercise
NCERT solutions for इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ chapter 1 - Querying and SQL Functions - Shaalaa.com

NCERT solutions for इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ chapter 1 - Querying and SQL Functions

Shaalaa.com has the CBSE Mathematics इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ CBSE solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. NCERT solutions for Mathematics इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ CBSE 1 (Querying and SQL Functions) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.

Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. NCERT textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.

Concepts covered in इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ chapter 1 Querying and SQL Functions are .

Using NCERT इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ solutions Querying and SQL Functions exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in NCERT Solutions are essential questions that can be asked in the final exam. Maximum CBSE इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ students prefer NCERT Textbook Solutions to score more in exams.

Get the free view of Chapter 1, Querying and SQL Functions इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ additional questions for Mathematics इन्फॉर्मैटिक्स प्रैक्टिसिज़ [अंग्रेजी] कक्षा १२ CBSE, and you can use Shaalaa.com to keep it handy for your exam preparation.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×