Lab BA 3 Sem Programs
Lab BA 3 Sem Programs
Deptname–
EmpID Employee Name Gender Date of Birth Date of Hiring Salary
D–45001 anne hardy F 03-01-1977 01-06-2006 45,000.00
HR–45001 RAM Sastry m 23-04-1999 01-02-2007 25,000.00
S–45203 syam mohan m 30-11-1987 06-08-2005 24,000.00
O–45301 riya SHAarma f 29-05-1993 13-01-2010 22,000.00
HR–45005 John Doe M 25-09-1997 28-10-2014 20,001.00
HR–45010 jack McGinnis M 04-06-1988 21-09-2012 15,800.00
S–45210 soe green m 20-08-1982 15-11-2013 20,345.00
S–45230 mc george M 22-11-1994 15-05-2016 28,349.00
D–45004 sam peter F 13-02-1984 01-09-2008 30,000.00
D – 45004 madhuri Dev F 13-02-1984 01-09-2008 30,000.00
Output:
Date of
Deptname EmpID Employee Name Gender Date of Birth Hiring Salary
D 45001 Anne Hardy F 03-01-1977 01-06-2006 45,000.00
HR 45001 Ram Sastry m 23-04-1999 01-02-2007 25,000.00
S 45203 Syam Mohan m 30-11-1987 06-08-2005 24,000.00
O 45301 Riya Shaarma f 29-05-1993 13-01-2010 22,000.00
HR 45005 John Doe M 25-09-1997 28-10-2014 20,001.00
HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 15,800.00
S 45210 Soe Green m 20-08-1982 15-11-2013 20,345.00
S 45230 Mc George M 22-11-1994 15-05-2016 28,349.00
D 45004 Sam Peter F 13-02-1984 01-09-2008 30,000.00
D 45004 Madhuri F 13-02-1984 01-09-2008 30,000.00
Employee Date of
Deptname EmpID Name Gender Date of Birth Hiring Salary
D 45001 Anne Hardy F 03-01-1977 01-06-2006 45,000.00
HR 45001 Ram Sastry M 23-04-1999 01-02-2007 25,000.00
S 45203 Syam Mohan M 30-11-1987 06-08-2005 24,000.00
O 45301 Riya Shaarma F 29-05-1993 13-01-2010 22,000.00
HR 45005 John Doe M 25-09-1997 28-10-2014 20,001.00
HR 45010 Jack Mcginnis M 04-06-1988 21-09-2012 15,800.00
S 45210 Soe Green M 20-08-1982 15-11-2013 20,345.00
S 45230 Mc George M 22-11-1994 15-05-2016 28,349.00
D 45004 Sam Peter F 13-02-1984 01-09-2008 30,000.00
D 45004 Madhuri F 13-02-1984 01-09-2008 30,000.00
Output:
5. Find the Number of years of service of service for an employee in the organisation as on
date.
Output:
Output:
8. If an employee has to retire at the age of 60, when will they retire.
9. Employees whose experience is greater than 10 years will get a bonus of 10%. Calculate
the bonus paid.
10. How many employees are there in each department and what is their total salary
department wise.
1. To get Department Name use the function =unique(Deptname)
2. To get Number of Employees in each department use the function
=COUNTIF($A$2:$A$11,C15)
3. To get Total Salary Department Wise use the function
=SUMIF($A$2:$A$11,C15#,$G$2:$G$11)
Madhuri
45006 dEv F 38 3,10,000
Somya
45078 Varma F 56 01-10-1990 6,50,000
45039 Raju beri M 43 02-08-1999 4,23,000
Madhuri
45006 dEv F 38 3,10,000
Somya
45078 Varma F 56 01-10-1990 6,50,000
45039 Raju beri M 43 02-08-1999 4,23,000
15. List out all the employees whose salary is greater than $3,00,000 and less than $4,00,000
give allowances of 5% and above $4,00,000 give allowances of 10%. Find the total
allowances paid by the company.
Customer Postal
ID Customer Name Contact Name Street Name City Code Country
Alfreds
3124 Futterkiste Maria Anders Obere Str. 57, Berlin 12209 Germany
avda. de la
Ana Trujillo Constituci¢n Mexico
1238 helados Ana Trujillo 2222 city 5021 Mexico
Antonio Mexico
4562 MorenoTaquer¡a antonio moreno mataderos 2312 city 5023 Mexico
new
678 Around the Horn thomas hardy 120 Hanover Sq. yoork WA1 1DP USA
Christina Berguvsv„gen 8
2314 Berglunds snabola Berglund Sydney Sydney 33-22 Australia
3657 Amit Mishra Maria Anders Obere Str. 57 Sydney 65 332-3 Australia
Avda. de la
Constitucion
7890 williami sanuo Ana Trujillo 2222 Sydney 43433 Australia
Antonio 120 Jefferson new
56789 Sonio Moreno Moreno St.,Riverside jersy 8075 USA
3657 Amit Mishra Maria Anders Obere Str. 57 Sydney 65 332-3 Australia
Berglunds Christina Berguvsv„gen 8
2314 snabbkp Berglund Sydney Sydney 33-22 Australia
16. Using Excel, concatenate the columns Street name and city.
Function used =CONCATENATE(D2,"-",E2)
Ouput:
Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
Alfreds
3124 Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
Ana Trujillo avda. de la Constituci¢n 2222-
1238 helados Ana Trujillo Mexico city 5021 Mexico
Antonio
4562 MorenoTaquer¡a antonio moreno mataderos 2312-Mexico city 5023 Mexico
678 Around the Horn thomas hardy 120 Hanover Sq.-new yoork WA1 1DP USA
Berglunds Christina Berguvsv„gen 8 Sydney-
2314 snabola Berglund Sydney 33-22 Australia
3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la Constitucion
7890 williami sanuo Ana Trujillo 2222-Sydney 43433 Australia
Antonio 120 Jefferson St.,Riverside-
56789 Sonio Moreno Moreno new jersy 8075 USA
3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Berglunds Christina Berguvsv„gen 8 Sydney-
2314 snabbkp Berglund Sydney 33-22 Australia
17. Insert "C-" in the left side of the customer Id in customer name column of the above data.
Function Used : =CONCATENATE("C-",A2)
Output:
Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
C-3124 Alfreds Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
Ana Trujillo avda. de la Constituci¢n
C-1238 helados Ana Trujillo 2222-Mexico city 5021 Mexico
Antonio mataderos 2312-Mexico
C-4562 MorenoTaquer¡a antonio moreno city 5023 Mexico
C-678 Around the Horn thomas hardy 120 Hanover Sq.-new yoork WA1 1DP USA
Christina Berguvsv„gen 8 Sydney-
C-2314 Berglunds snabola Berglund Sydney 33-22 Australia
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la Constitucion
C-7890 williami sanuo Ana Trujillo 2222-Sydney 43433 Australia
Antonio 120 Jefferson St.,Riverside-
C-56789 Sonio Moreno Moreno new jersy 8075 USA
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Christina Berguvsv„gen 8 Sydney-
C-2314 Berglunds snabbkp Berglund Sydney 33-22 Australia
18. Using Excel Remove Extra spaces and format the names of customer name column.
Function Used: =Trim(Customer Name)
=proper(Customer Name)
Output:
Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
C-3124 Alfreds Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
avda. de la
Constituci¢n 2222-
C-1238 Ana Trujillo Helados Ana Trujillo Mexico city 5021 Mexico
Antonio mataderos 2312-
C-4562 Morenotaquer¡A antonio moreno Mexico city 5023 Mexico
120 Hanover Sq.-new
C-678 Around The Horn thomas hardy yoork WA1 1DP USA
Christina Berguvsv„gen 8
C-2314 Berglunds Snabola Berglund Sydney-Sydney 33-22 Australia
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la
Constitucion 2222-
C-7890 Williami Sanuo Ana Trujillo Sydney 43433 Australia
Antonio 120 Jefferson
C-56789 Sonio Moreno Moreno St.,Riverside-new jersy 8075 USA
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Christina Berguvsv„gen 8
C-2314 Berglunds Snabbkp Berglund Sydney-Sydney 33-22 Australia
19. From the above table remove the duplicate rows.
Procedure:
1. Select the data set.
2. Click on Data → Remove Duplicates
3. Click Select All
4. Duplicates rows will get deleted
Output:
Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
C-3124 Alfreds Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
avda. de la
Constituci¢n 2222-
C-1238 Ana Trujillo Helados Ana Trujillo Mexico city 5021 Mexico
Antonio mataderos 2312-
C-4562 Morenotaquer¡A antonio moreno Mexico city 5023 Mexico
120 Hanover Sq.-new
C-678 Around The Horn thomas hardy yoork WA1 1DP USA
Christina Berguvsv„gen 8
C-2314 Berglunds Snabola Berglund Sydney-Sydney 33-22 Australia
C-3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la
Constitucion 2222-
C-7890 Williami Sanuo Ana Trujillo Sydney 43433 Australia
Antonio 120 Jefferson
C-56789 Sonio Moreno Moreno St.,Riverside-new jersy 8075 USA
Christina Berguvsv„gen 8
C-2314 Berglunds Snabbkp Berglund Sydney-Sydney 33-22 Australia
20. From the above table remove the customer whose customer ID is not a 4 digit number
Output:
Customer Postal
ID Customer Name Contact Name Street Name-City Code Country
3124 Alfreds Futterkiste Maria Anders Obere Str. 57,-Berlin 12209 Germany
avda. de la
Constituci¢n 2222-
1238 Ana Trujillo Helados Ana Trujillo Mexico city 5021 Mexico
Antonio mataderos 2312-
4562 Morenotaquer¡A antonio moreno Mexico city 5023 Mexico
Christina Berguvsv„gen 8
2314 Berglunds Snabola Berglund Sydney-Sydney 33-22 Australia
3657 Amit Mishra Maria Anders Obere Str. 57-Sydney 65 332-3 Australia
Avda. de la
Constitucion 2222-
7890 Williami Sanuo Ana Trujillo Sydney 43433 Australia
Christina Berguvsv„gen 8
2314 Berglunds Snabbkp Berglund Sydney-Sydney 33-22 Australia
IV. Table for Question No. 20-25
Output:
22. From the above data in Excel, convert the numerals in Year column to text format.
Ouput:
23. From the above table in Excel, highlight the blank spaces and fill it with "Not Available".
Output:
24. From the above table in Excel, select only the first name from the Employee name and paste in
another column.
Use text to column under Data Menu to split the Employee Name
Output:
Age
As
Employee Employee First Last Gender on Year of Date of Salary in
ID Name Name Name (M/F) date Graduation Hiring Rupees
D45078 Somya Rao Somya Rao F 50 1975 01-10-1990 6,50,000
S45039 Raju Budda Raju Budda M 43 2000 02-08-1999 4,23,000
M45020 Jai Raj Jai Raj M 48 1993 08-10-2000 4,65,000
Kalyani Not
M45038 Kumari Kalyani Kumari F 37 2004 Available 3,12,000
M45037 Sam Joes Sam Joes M 36 2005 04-02-2006 3,20,000
S45059 Poter Michel Poter Michel M 39 2004 03-10-2008 2,89,000
Siddu
F45012 kommnani Siddu kommnani M 42 2000 15-10-2007 4,12,000
Geeta
F45023 Chowdari Geeta Chowdari F 46 1996 12-10-2005 4,34,000
Lavanya Not
D45078 Koppula Lavanya Koppula F 49 1994 31-10-2004 Available
Not
Available Hema Sarvani Hema Sarvani F 50 1992 25-10-2000 5,69,000
S45060 Gopal Das Gopal Das M 54 1998 12-09-2001 6,32,000
Not
F45062 Siya Paul Siya Paul F 51 Available 19-06-2003 5,90,000
Not
M45026 Hari Krishna Hari Krishna M 38 2003 25-04-2003 Available
O45029 Priya Dixit Priya Dixit F 27 2005 12-07-2006 3,45,000
A45037 Anu Devara Anu Devara F 58 1985 12-09-2008 6,95,000
25. Create Email Addresses using lower case and underscore in between the names and end with
“@gmail.com”. (For example [email protected])
Procedure:
1. Lower(First Name)
2. Lower(Last Name
3. Use the function =CONCATENATE(First Name,"_",Last Name,"@gmail.com")
Output:
26. From the above table, remove the invalid phone number which are not in the proper format of
having 10 digits, no characters and the phone numbers which are starting with 9/8/7/6
27. From the above table, put the phone numbers in US format.
28. From the above table, split the Address column into Address, City, State and ZIP code.
ZIP
Address City State Code
939 clear edge mesita wv 14424
873 iron third harbor whelen springs nm 37783
856 forge overpass annandale nm 8463
515 silver highlands natalbany wy 462
29. From the above table, select only the middle name from customer name.
30. From the above table, calculate the number of days required for shipment.
Output:
No of Days
Shipment required
Customer Name Company name Order Date
Date for
shipment
Jim van der Mheen Stokes, Rutherford and Bauch 25-05-2016 19-04-2016 36
Shenita Daven port Waelchi Inc 02-08-2016 03-07-2016 30
Jimmie Mc Clure Braun, Crooks and Ortiz 30-10-2016 21-10-2016 9
Mary Belle Serrano Schamberger, Yost and Dach 20-04-2016 01-04-2016 19
Vito van Helpen Mann, Sauer and Sauer 10-08-2016 18-07-2016 23
Salvatore Van
Schmidt-Marks 30-08-2016 29-07-2016 32
Egmond
Huels, Schuster and
Hay Wood Meza 25-02-2016 15-01-2016 41
Daugherty
Margrett Cowan Armstrong Group 05-08-2017 15-07-2017 21
Jerold MC Hooper Muller, Lakin and Bogan 05-04-2017 26-03-2017 10
Leandro van der
Mueller and Sons 18-03-2017 18-01-2017 59
Woerd
Haywood Huber Braun, Crooks and Ortiz 20-06-2017 31-05-2017 20
Particia Veen Hof Schmidt-Marks 08-08-2017 02-08-2017 6
Yvone Esparza Brook Weber, Kuhlman and Hirthe 13-12-2017 05-12-2017 8
Yvone Esparza Weber, Kuhlman and Hirthe 30-05-2017 30-04-2017 30
Jame Oosthuijzen Graham, Towne and Monahan 20-09-2017 07-09-2017 13
Filiberto Kues Schmidt-Marks 20-05-2017 16-05-2017 4
Power Pivot and Power Query Questions:
VI. Power Query link(Order data set 1) Power Query link ( Order data set 2)
Procedure:
32. Split the column Customer ID into Customer ID and Customer Name.
Procedure:
33. Remove the currency Symbol and the decimals (Give reasons for removing them) from the
column Cookies shipped.
35. How many days does it take for the delivery of orders.
1. Load both the files 2017 Order Data and 2018 Order Data in to Power Query Editor
37. Create Pivot table for the cookies shipped year wise and quarter wise.
Number of Cookies
Row Labels Shipped
2017
Qtr1 78103
Qtr2 103576
Qtr3 110744
Qtr4 108776
2018
Qtr1 103672
Qtr2 108924
Qtr3 120991
Qtr4 115250
2019
Qtr1 4672
Grand Total 854708
38. Create pivot table and graph for the cookies shipped customer wise.
Pivot Table:
Cookies
Customer Name Shipped
Acme Grocery Stores 60568
Cascade Grovers 252330
Park & Eat LLC 149617
Quick Bite Convenience Stores 207278
YT Restaurants 184200
Grand Total 853993
Pivot Chart:
Sum of
Row Labels Profits
Acme Grocery Stores 151420
Cascade Grovers 630825
Park & Eat LLC 374042.5
Quick Bite Convenience Stores 518195
YT Restaurants 460500
Grand Total 2134982.5
40. Crate pivot table to know the relationship between the sales and the delivery of the orders.
2. Select the first two columns, under Transform>Text column, select Merge Columns, in the
prompt, select Space as separator.
42. In Power Query Editor Split the column ship mode and container.
43. What is percentage of total shipping amount for each order priority.
44. Find the bottom 3 Shipment Mode and Container by total Unit Sell Price.
C629 1.26
C220 1.68
C328 1.7
C277 1.74
C427 1.76
Customer ID Unit Price
C683 1.76
C444 1.88
C727 1.88
C212 2.08
C516 2.1
46. Calculate the number days for shipment and establish a relationship between the number days
for shipment and shipment amount.
1 624 7590.85
2 813 10267.26
7 61 740.03
3 82 947.47
0 225 2553.48
4 92 1399.06
5 83 1195.48
9 22 235.58
6 2 18.85
C001 2.88
C002 554.88
C003 5.98
C004 138.67
C005 435.36
C006 11.3
C007 6804.75
C009 45.99
Customer ID Total Selling Price
C010 93.93
C011 32.43
48. Has Order priority has any influence on the shipping amount.
No.