Page 365 - Informatics_Practices_Fliipbook_Class12
P. 365

21.  Write SQL statements to:
                a.  display seven characters from the end of the string "Grow More Trees".

                b.  display numeric month for the date 2021-10-18.
             22.  What will be the output produced on the execution of following code snippet?

                import pandas as pd
               list1 = [10, 20, 30]

               S1 = pd.Series(list1)
               print(S1+S1)
            23.  Differentiate between a copyright and a patent.
             24.  Fill in the blanks in the code snippet given below which produces the following output:

                Mohit  90%
              Manan  80%
              Code Snippet
               import pandas _____________ pd
               dictnew = {'Mohit': '90%', 'Rajat': '85%', 'Manan' : '80%', 'Snehil':'75%'}

               ser = pd.Series(____________)
               print(___________[['Mohit', '____________']])
             25.  Define an entity and an attribute with respect to RDBMS.
                                                            Section-C

             26.  Consider the following table:
                                           Table: STATIONARY

                     S_ID             ITEM           COMPANY           PRICE
                     DP01      Dot Pen              ABC                  10
                     PL02      Pencil               XYZ                  6
                     ER05      Eraser               XYZ                  7
                     PL01      Pencil               CAM                  5
                     GP02      Gel Pen              ABC                  15

                 Write SQL statements to perform the following:

                a. To display sum of price for each company having more than one stationary item.
                b. To display item names in descending order of their prices.

                c. To display the name and price of the item where the item name contains the letter 'L'.
                                                               OR

                  Based on the above table STATIONARY, what will be the outputs produced on the execution of following SQL
                statements?



                a. SELECT STATIONARYNAME, AVG(PRICE) AS 'AVERAGE PRICE' FROM STATIONARY WHERE
                  STATIONARYNAME = 'Pencil';
                b.  SELECT MIN(PRICE) FROM STATIONARY;

                c.  SELECT COMPANY, PRICE FROM STATIONARY WHERE PRICE < 10;


                                                                                                Practice Paper 1  351
   360   361   362   363   364   365   366   367   368   369   370