0% found this document useful (0 votes)
54 views

Problem Statement - Practical 5

The document contains tables with bank deposit, loan, customer, branch, and employee data. It lists 20 problems related to summarizing, querying, updating, and manipulating the data in the tables. The problems include calculating totals, finding maximum values, counting rows, creating new tables from existing data, inserting and deleting rows, renaming tables, and writing SQL queries.

Uploaded by

MANTHAN JADHAV
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Problem Statement - Practical 5

The document contains tables with bank deposit, loan, customer, branch, and employee data. It lists 20 problems related to summarizing, querying, updating, and manipulating the data in the tables. The problems include calculating totals, finding maximum values, counting rows, creating new tables from existing data, inserting and deleting rows, renaming tables, and writing SQL queries.

Uploaded by

MANTHAN JADHAV
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Practical 5

Problem definition
Deposit

ACTNO CNAME                                 BNAME                                          AMOUNT                            


ADATE
--------------------------------------------- ------------------------------------------ -------------------------------
------------------------------
100   ANIL                                         VRCE                                              1000                                       01-
MAR-95
101   SUNIL                                       AJNI                                               5000                                       04-
JAN-96
102   MEHUL                                 KAROLBAGH                                 3500                                      17-
NOV-95
104   MADHURI                             CHANDI                                         1200                                      17-
NOV-95
105   PRMOD                                 M.G.ROAD                                    3000                                      27-
MAR-96
106   SANDIP                                 ANDHERI                                       2000                                      31-
MAR-96
107   SHIVANI                                VIRAR                                            1000                                       05-
SEP-95
108   KRANTI                                  NEHRU PLACE                              5000                                       02-
JUL-95
109   MINU                                     POWAI                                          7000                                       10-
AUG-95

BORROW;

LOANN CNAME                                            BNAME                                                 AMOUNT


---------------------------------------------------- ----------------------------------------------
-------------------------------------------------
201   ANIL                                                     VRCE                                                      1000
206   MEHUL                                                AJNI                                                       5000
311   SUNIL                                                  DHARAMPETH                                     3000
321   MADHURI                                          ANDHERI                                               2000
375   PRMOD                                              VIRAR                                                     8000
481   KRANTI                                               NEHRU PLACE                                      3000

CUSTOMERS;
CNAME                                                          CITY
----------------------------------------------------- --------------------------------------------
ANIL                                                               CALCUTTA
SUNIL                                                             DELHI
MEHUL                                                          BARODA
MANDAR                                                      PATNA
MADHURI                                                     NAGPUR
PRAMOD                                                      NAGPUR
SANDIP                                                         SURAT
SHIVANI                                                        BOMBAY
KRANTI                                                         BOMBAY
NAREN                                                         BOMBAY

BRANCH;

BNAME                                                             CITY
------------------------------------------------------- ---------------------------------------
VRCH                                                                NAGPUR
AJNI                                                                  NAGPUR
KAROLBAGH                                                   DELHI
CHANDI                                                            DELHI
DHARAMPETH                                               NAGPUR
M.G.ROAD                                                      BANGLORE
ANDHERI                                                         BOMBAY
VIRAR                                                              BOMBAY
NEHRU PLACE                                                DELHI
POWAI                                                            BOMBAY

Employee
    EMP_NO EMP_NAME                          EMP_SAL   EMP_COMM    DEPT_NO
---------- ---------------------------------------- ------------------ --------------------- ----------
       101 Smith                                              800                                              10
       102 Snehal                                            1600                  300                     25
       103 Lakshman                                     1100                   0                        20
       104 Aman                                            3000                                             10
       105 Anita                                             5000                   50000                10
       106 Sneha                                            2450                   24500                10
       107 Anamika                                      1975                                             30

Problem statements
(1) List total deposit from deposit.
(2) List total loan from karolbagh branch

(3) Give maximum loan from branch vrce.

(4) Count total number of customers

(5) Count total number of customer’s cities.

(6) Create table supplier from employee with all the columns.

(7) Create table sup1 from employee with first two columns.

(8) Create table sup2 from employee with no data.

(9) Insert the data into sup2 from employee whose second character should be ‘n’
and string should be 5 characters long in employee name field.

(10) Delete all the rows from sup1.

(11) Delete the detail of supplier whose sup_no is 103.

(12) Rename the table sup2.

(13) Destroy table sup1 with all the data.

(14) Update the value dept_no to 10 where second character of emp. name is ‘m’.

(15) Update the value of employee name whose employee number is 103.

(16) Write a query to display the current date. Label the column Date

(17) For each employee, display the employee number, job, salary, and salary
increased by 15% and expressed as a whole number. Label the column New Salary

(18) Modify your query no 4.(2) to add a column that subtracts the old salary from
the new salary. Label the column Increase

(19) Write a query that displays the employee’s names with the first letter capitalized
and all other letters lowercase, and the length of the names, for all employees whose
name starts with J, A, or M. Give each column an appropriate label. Sort the results
by the employees’ last names.

(20) Write a query that produces the following for each employee:
<employee last name> earns <salary> monthly

You might also like