Advertisements
Chapters
2: Data Handling using Pandas - I
3: Data Handling using Pandas - II
4: Plotting Data using Matplotlib
5: Internet and Web
6: Societal Impacts
Chapter 7: Project Based Learning
![NCERT solutions for इन्फोर्मेटिक्स प्रैक्टिसिज़ [इंग्रजी] इयत्ता १२ chapter 1 - Querying and SQL Functions NCERT solutions for इन्फोर्मेटिक्स प्रैक्टिसिज़ [इंग्रजी] इयत्ता १२ chapter 1 - Querying and SQL Functions - Shaalaa.com](/images/informatics-practices-english-class-12_6:55813b5fe8c1458f80d0fbe8dfc569b6.jpg)
Advertisements
Solutions for Chapter 1: Querying and SQL Functions
Below listed, you can find solutions for Chapter 1 of CBSE NCERT for इन्फोर्मेटिक्स प्रैक्टिसिज़ [इंग्रजी] इयत्ता १२.
NCERT solutions for इन्फोर्मेटिक्स प्रैक्टिसिज़ [इंग्रजी] इयत्ता १२ 1 Querying and SQL Functions Intext Questions [Pages 7 - 15]
Activity 1.1
Using the table SALE of CARSHOWROOM database, write SQL queries for the following:
- Display the InvoiceNo and commission value rounded off to zero decimal places.
- Display the details of SALE where payment mode is credit card..
Activity 1.2
Using the table INVENTORY from CARSHOWROOM database, write SQL queries for the following:
- Convert the CarMake to uppercase if its value starts with the letter ‘B’.
- 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
Using the table EMPLOYEE from CARSHOWROOM database, write SQL queries for the following:
- Display employee name and the last 2 characters of his EmpId.
- Display designation of employee and the position of character ‘e’ in designation, if present.
Activity 1.4
Using the table EMPLOYEE of CARSHOWROOM database, list the day of birth for all employees whose salary is more than 25000.
Think and Reflect
Can we use arithmetic operators (+, −. *Can we use arithmetic operators (+, −. *, or /) on date functions?, or /) on date functions?
Activity 1.5
Find sum of Sale Price of the cars purchased by the customer having ID C0001 from table SALE.
Find the maximum and minimum commission from the SALE table.
Activity 1.6
List the total number of cars sold by each employee.
List the maximum sale made by each employee.
NCERT solutions for इन्फोर्मेटिक्स प्रैक्टिसिज़ [इंग्रजी] इयत्ता १२ 1 Querying and SQL Functions Exercise [Pages 23 - 25]
Define RDBMS. Name any two RDBMS software.
What is the purpose of the following clause in a select statement?
ORDER BY
What is the purpose of the following clauses in a select statement?
HAVING
Site any two differences between Single Row Functions and Aggregate Functions.
What do you understand by Cartesian Product?
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.
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.
Write the name of the functions to perform the following operation:
To display the name of the month in which you were born.
Write the name of the functions to perform the following operation:
To display your name in capital letters.
Write the output produced by the following SQL statement:
SELECT POW(2, 3);
Write the output produced by the following SQL statement:
SELECT ROUND(123.2345, 2),
ROUND(342.9234, −1);
Write the output produced by the following SQL statement:
SELECT LENGTH("Informatics Practices");
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”);
Write the output produced by the following SQL statement:
SELECT LEFT("INDIA", 3), RIGHT("Computer Science", 4),
Write the output produced by the following SQL statement:
SELECT MID("Informatics",3,4), SUBSTR("Practices",3);
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:
- Create the table Product with appropriate data types and constraints.
- Identify the primary key in the Product.
- 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.
- Add a new column Discount to the table Product.
- 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.
- Increase the price by 12 percent for all the products manufactured by Dove.
- 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:
- 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;
Using the CARSHOWROOM database given in the chapter, write the SQL queries for the following:
- Add a new column Discount in the INVENTORY table.
- 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. - Display the name of the costliest car with the fuel type “Petrol”.
- Calculate the average discount and total discount available on Baleno cars.
- List the total number of cars having no discount.
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:
- Create the database Streams_Of_Students.
- Create the table Student by choosing appropriate data types based on the data given in the table.
- Identify the Primary keys from tables Student and Stream. Also, identify the foreign key from the table Stream.
- Jay has now changed his stream to Humanities. Write an appropriate SQL query to reflect this change.
- Display the names of students whose names end with the character ‘a’. Also, arrange the students in alphabetical order.
- 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).
- List the number of students in each stream having more than 1 student.
- Display the names of students enrolled in different streams, where students are arranged in descending order of admission number.
- Show the Cartesian product on the Student and Stream table. Also mention the degree and cardinality produced after applying the Cartesian product.
- Add a new column ‘TeacherIncharge” in the Stream table. Insert appropriate data in each row.
- List the names of teachers and students.
- 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
![NCERT solutions for इन्फोर्मेटिक्स प्रैक्टिसिज़ [इंग्रजी] इयत्ता १२ chapter 1 - Querying and SQL Functions NCERT solutions for इन्फोर्मेटिक्स प्रैक्टिसिज़ [इंग्रजी] इयत्ता १२ chapter 1 - Querying and SQL Functions - Shaalaa.com](/images/informatics-practices-english-class-12_6:55813b5fe8c1458f80d0fbe8dfc569b6.jpg)
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.
