You are on page 1of 24

MBA Weekend ITM LAB

ITM Lab File

Submitted By-
Name : Divya Gupta
Roll No. - 09516688516
Master of Business Administration
Weekend Programme

University School of Management Studies


Guru Gobind Singh Indraprastha University,
Sector - 16C Dwarka, Delhi - 110078, India
MBA Weekend ITM LAB

1. Create an ordered and unordered list of your choice.

Solution : The coding for highlighted query is given below :

<html>

<title> ITM Lab File</title>

<body>
<h2 style="text-align: center;"><span style="color: #800080;">Ordered
& Unordered

List</span></h2>

<ol type="1"> Ordered List of Books


<li> The God of Small things</li>
<li> The Sellout</li>
<li> One Indian Girl</li>
<li> Two Lives</li>
<li> Life is What You Make It</li>
</ol>

<ul type="disc"> Unordered List of Authors

<li> Arundhati Roy</li>


<li> Paul Beatty</li>
<li> Chetan Bhagat</li>
<li> Vikram Seth</li>
<li> Preeti Shenoy</li>

</ul>
</body>

</html>

OUTPUT :
MBA Weekend ITM LAB
MBA Weekend ITM LAB

2. Create a HTML file using following tags:

a) Header Tags
b) Formatting Tags
c) Anchor Tags

Solution : The coding for highlighted query is given below :

<html>
<title> ITM Lab File</title>
<body>
<h2 style="text-align: center;"><span style="color: #800080;">Header,
Formatting & Anchor Tags</span></h2>
<h3><span style="color: #0000ff;">Header Tags</span></h3>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
<p>This is Pre-formatted tags</p>
</br>

<h3><span style="color: #0000ff;">Formatting Tags</span></h3>


<p><b>This is bold text.</b></p>
<i>This is Italic text.</i></p>
<p><u>This is Underlined text.</u></p>
<p><strike>This is Strike through text.</strike></p>
<p><em>This text is Emphasized</em></p>
<p><strong>This text is Strong</strong></p>
<p>This is <sup>Super-scripted</sup> text.</p>
<p>This is <sub>Sub-scripted</sub> text.</p>
<p>This is <tt>Type-writer Font</sup> text.</p>
<p><address>This is just like Italic.</address></p>
<p><big>This is just Larger than normal font.</big></p>
<p><small>This is just Lower than normal font.</small></p>
</br>

<h3><span style="color: #0000ff;">Anchor Tags</span></h3>


<h1> This is an example of Hyperlink.</h1>
<a href="Ordered-Unordered List.html"> Ordered & Unordered List</a>
<br>
<a href="Ordered-Unordered List.html#middle"> Middle section of next
page</a>

</body> </html>

3. Create an ordered and definition list of your choice.


MBA Weekend ITM LAB

Solution : The coding for highlighted query is given below :


<html>

<title> ITM Lab File</title>

<body>

<h2 style="text-align: center;"><span style="color: #800080;">Ordered


& Definition List</span></h2>

<ol type="1"> <span style="color: blue;"><b>Ordered List of


Books </b></span>
<li> The God of Small things</li>
<li> The Sellout</li>
<li> One Indian Girl</li>
<li> Two Lives</li>
<li> Life is What You Make It</li>
</ol>

<dl> <span style="color: blue;"><b>Definition List of


Authors</b></span>

<dt> Q. Who is the author of Book "The God of Small


things"?</dt>
<dd> Ans: Arundhati Roy</dd>
<dt> Q. Who is the author of Book "The Sellout"?</dt>
<dd> Ans: Paul Beatty</dd>
<dt> Q. Who is the author of Book "One Indian Girl"?</dt>
<dd> Ans: Chetan Bhagat</dd>
<dt> Q. Who is the author of Book "Two Lives"?</dt>
<dd> Ans: Vikram Seth</dd>
<dt> Q. Who is the author of Book "Life is What You Make It"?
</dt>
<dd> Ans: Preeti Shenoy</dd>
</dl>

</body>

</html>

OUTPUT :
MBA Weekend ITM LAB

4. Create an Unordered and Definition list of your choice.


MBA Weekend ITM LAB

Solution : The coding for highlighted query is given below :


<html>
<title> ITM Lab File</title>

<body>
<h2 style="text-align: center;"><span style="color:
#800080;">Unordered & Definition List</span></h2>
<dl> <span style="color: blue;"><b>Nested List </b></span>
<dt> Q. List the name of Best Books of the Year 2016?</dt>
<dd> Ans: The list of the Best Books of the Year 2016 are:
<ul type="disc">
<li> The Sellout</li>
<li> The Past</li>
<li> One Indian Girl</li>
<li> The Vegetarian</li>
<li> Two Lives</li>
<li> Life is What You Make It</li>
<li> The Fireman</li>
</ul>
</dd>

<dt> Q. List the name of the Subjects you are studying in


MBAW-16?</dt>
<dd> Ans: The list of the Subjects are:
<ul type="square">
<li> Information Technology
Management</li>
<li> Information Technology Management
Lab</li>
<li> Accounting for Management</li>
<li> Managerial Economics</li>
<li> Management Process &
Organizational Behaviour</li>
<li> Decision Sciences</li>
<li> Business Communication</li>

</ul>
</dd>
</dl>
</body>

</html>

OUTPUT :
MBA Weekend ITM LAB

5. Create a hyperlink to transfer the control to another webpage and


back to the original webpage.
MBA Weekend ITM LAB

Solution : The coding for highlighted query is given below :

<html>
<title> ITM Lab File</title>

<body>

<h3><span style="color: #0000ff;">Nested Links</span></h3>

<a href="List of Subject.html"> Name of the Subject of MBAW</a>


<br>

<a href="Relative Links.html"> Subject and Teachers</a>


<br>

</body>

</html>

OUTPUT :
MBA Weekend ITM LAB

6. Create a hyperlink to transfer the control to some other location


on the same webpage.
MBA Weekend ITM LAB

Solution : The coding for highlighted query is given below :


<html>

<title> ITM Lab File</title>

<body>
<h2 style="text-align: center;"><span style="color: #800080;">Relative
Links</span></h2>
<h3> Subjects in MBA Weekend Course</h1>
<p>Click on the Names of the Subject to know more Information about
them.<br>
<a href="#Information Technology Management"> Information
Technology Management</a><br>
<a href="#Information Technology Management Lab"> Information
Technology Management Lab</a><br>
<a href="#Accounting for Management"> Accounting for
Management</a><br>
<a href="#Managerial Economics"> Managerial
Economics</a><br>
<a href="#Business Communication"> Business
Communication</a><br>
<a href="#Management Process & Organizational Behaviour">
Management Process & Organizational Behaviour</a><br>
<a href="#Decision Sciences"> Decision Sciences</a><br>
</p>
<hr>
<dl>
<dt><a name="Information Technology Management Lab">
<b>Information Technology Management Lab</b>
</a>
<dd>Information Technology Management Lab is taught by <b>Mr. Sahu
Sir</b>.
</dd><br>
<dt><a name="Information Technology Management">
<b>Information Technology Management</b>
</a>
<dd>Information Technology Management is taught by <b>Ms. Sinthiya
Mam</b>.
</dd><br>
<dt><a name="Accounting for Management">
<b>Information Technology Management</b>
</a>
<dd>Accounting for Management is taught by <b>Ms. Bharti Mam</b>.
</dd><br>
<dt><a name="Managerial Economics">
<b>Managerial Economics</b>
</a>
<dd>Managerial Economics is taught by <b>Prof. Subhash Gupta</b>.
</dd><br>
<dt><a name="Business Communication">
MBA Weekend ITM LAB

<b>Business Communication</b>
</a>
<dd>Business Communication is taught by <b>Prof. Anu Lather
Mam</b>.
</dd><br>
<dt><a name="Management Process & Organizational Behaviour">
<b>Management Process & Organizational Behaviour</b>
</a>
<dd>Management Process & Organizational Behaviour is taught by
<b>Dr. Shilpa Jain</b>.
</dd><br>
<dt><a name="Decision Sciences">
<b>Decision Sciences</b>
</a>
<dd>Decision Sciences is taught by <b>Dr. Ashish Kumar</b>.
</dd><br>

</body>
</html>
MBA Weekend ITM LAB

OUTPUT :
MBA Weekend ITM LAB

7. Create the following table:

Empno Empname Designation

1111 Rakesh Manager

2222 Suresh

Solution :

<html>
<title> ITM Lab File</title>

<body>
<table border='1'width="50%" cellpadding="5" cellspacing="4">

<tr>
<td>empno</td>
<td>empname</td>
<td>designation</td>
</tr>
<tr>
<td>1111</td>
<td>rakesh</td>
<td rowspan="2">Manager</td>
</tr>
<tr>
<td>2222</td>
<td>suresh</td>
</tr>
</table>

</body>

</html>
MBA Weekend ITM LAB

8. Create a table as shown below using table tags.

Solution :

<html>
<title> ITM Lab File</title>

<body>
<table border='1'width="25%" cellpadding="5" cellspacing="4">
<tr>
<td>CELL 1</td>
<th colspan="2"> Cell Spans 2 Columns</th>
</tr>

<tr>
<td>CELL 2</td>
<td>CELL 3</td>
<td>CELL 4</td>
</tr>
</table>

</body>

</html>
MBA Weekend ITM LAB

9. Create a form of your resume using html.


Solution :

<html>
<head>
<meta charset="utf-8">
<title> ITM Lab File </title>
</head>
<body>
<form action="#">
<table border="1" style="text-align: center;">
<thead>
<tr><th colspan="4">Resume</th></tr>
</thead>
<tbody>
<tr><td colspan="4" style="border: none;padding-top: 25px;"></td></tr>
<tr><td colspan="4">Basic Details</td></tr>
<tr><td>First Name</td><td><input type="text" value=""><td>Last Name</td><td><input
type="text" value=""></td></tr>
<tr><td>Email Adress</td><td><input type="text" value=""></td><td>Mobile
Number</td><td><input type="text" value=""></td></tr>
<tr><td>Fathers Name</td><td><input type="text" value=""></td><td>Mothers
Name</td><td><input type="text" value=""></td></tr>
<tr><td>Adress</td><td colspan="3"><input style="width: 98%;" type="text"
value=""></td></tr>
<tr><td colspan="4" style="border: none;padding-top: 15px;"></td></tr>
<tr><td colspan="4">Educational Details</td></tr>
<tr><td>Post Graduation</td><td>Graduation</td><td>12th</td><td>10th</td></tr>
<tr>
<td><input type="text" value="" placeholder="University/Board"></td>
<td><input type="text" value="" placeholder="University/Board"></td>
<td><input type="text" value="" placeholder="University/Board"></td>
<td><input type="text" value="" placeholder="University/Board"></td>
</tr>
<tr>
<td><input type="text" value="" placeholder="Year Of Passing"></td>
<td><input type="text" value="" placeholder="Year Of Passing"></td>
<td><input type="text" value="" placeholder="Year Of Passing"></td>
<td><input type="text" value="" placeholder="Year Of Passing"></td>
</tr>
<tr>
<td><input type="text" value="" placeholder="Percentage"></td>
<td><input type="text" value="" placeholder="Percentage"></td>
<td><input type="text" value="" placeholder="Percentage"></td>
<td><input type="text" value="" placeholder="Percentage"></td>
</tr>
<tr>
MBA Weekend ITM LAB

<td><input type="text" value="" placeholder="Stream"></td>


<td><input type="text" value="" placeholder="Stream"></td>
<td><input type="text" value="" placeholder="Stream"></td>
<td><input type="text" value="" placeholder="Stream"></td>
</tr>
<tr><td colspan="4" style="border: none;padding-top: 15px;"></td></tr>
<tr><td colspan="4">Experience Details</td></tr>
<tr><td colspan="4" style="border: none;padding-top: 10px;"></td></tr>
<tr><td rowspan="2">Technology's Worked on:</td><td><input type="text"
value=""></td><td><input type="text" value=""></td><td><input type="text"
value=""></td></tr>
<tr><td><input type="text" value=""></td><td><input type="text"
value=""></td><td><input type="text" value=""></td></tr>
<tr><td colspan="4" style="border: none;padding-top: 10px;"></td></tr>
<tr><td rowspan="2">Projects's Worked on:</td><td><input type="text"
value=""></td><td><input type="text" value=""></td><td><input type="text"
value=""></td></tr>
<tr><td><input type="text" value=""></td><td><input type="text"
value=""></td><td><input type="text" value=""></td></tr>
</tbody>
</table>
<input type="submit" value="Submit" style="margin-top: 10px;margin-left: 285px;">
</form>
</body>
</html>
MBA Weekend ITM LAB

10. Create a form to collect feedback from students about the


course contents.
Solution :
<html>
<head>
<title> ITM Lab File </title>
</head>
<body bgcolor="pink">
<form>
<fieldset>
<legend align="center"><FONT size=5><b> MBA
STUDENTS APPLICATION FORM</FONT></legend>
<br><br><br>
<FONT color="brown">
<b>NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT><input
type="text" size=20 maxelength=10 value="USMS">
<br><br><br>
<FONT
color="brown"><b>PASSWORD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;</FONT><input type="password">
<br><br><br>
<FONT
color="brown"><b>CITY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;</FONT><select>
<option> Nagpur </option>
<option> Delhi </option>
<option> Kanpur </option>
</select>
<br><br><br>
<FONT
color="brown"</FONT><b>QUALIFICATION&nbsp;</FONT><select align="top"
multiple size=4>
<option> MBA </option>
<option> MCA </option>
<option> B.Tech </option>
<option> BBA </option>
<option> B.E. </option>
<option> BCA </option>
</select>
<br><br><br>
</form>
<FONT
color="brown"><b>SEX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;</FONT><input type="radio" name="gender" checked> MALE
<input type="radio" name="gender">FEMALE
MBA Weekend ITM LAB

<br><br><br>
<FONT
color="brown"><b>HOBBIES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT><input type="checkbox"
checked>MUSIC
<input type="checkbox" >SPORTS
<br><br><br>
<FONT color="brown"
align="top"><b>ADDRESS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT><textarea cols=50 rows=10> DEFAULT
TEXT</textarea>
<br><br><br>
<FONT
color="brown"><b>ATTACHMENT&nbsp;&nbsp;&nbsp;</FONT><input
type="file">
<br><br><br>
<FONT color="brown"><b>&nbsp;&nbsp;&nbsp;</FONT><input
type="submit" value="SUBMIT">
<FONT color="brown"><b>&nbsp;&nbsp;&nbsp;</FONT><input
type="reset" value="RESET">
<FONT color="brown"><b>&nbsp;&nbsp;</FONT><input
type="button" value=" EDIT ">
</fieldset>
</form>
</body>
</html>
MBA Weekend ITM LAB

SQL
Q: Display average salary of employees having salary greater than 500 from emp
table.

Solution select job,avg(sal) from emp group by job having avg(sal) > 500;

Q: Display the department no and total no of employees from emp table and
group them by department number.

Solution select deptno, count(empno) from emp group by deptno;

Q: Display the total salary from emp table where department ni is either 10 or
20.

Solution select sum(sal) from emp where deptno IN(10,20);

Q: Display dept no and total salary from emp table where job is not equals to
salesman and employee having total salary greater than 6000.

Solution select deptno, sum(sal) from emp where job NOT IN (salesman)
group by deptno having sum(sal) > 6000;

Q: Display dept no and total number of job in emp table and group them by
deptno.

Solution select deptno, count(job) from emp group by deptno;

Q: Display second maximum salary from emp table

Solution select max(sal) from emp where sal NOT IN(select max(sal) from
emp);

Q: Create a table newdept.

Solution create table newdept


(deptno number(10),
deptname varchar2(20),
deptloc varchar2(20));
MBA Weekend ITM LAB

Q: Alter table empdata and add primary constraint on employee id.

Solution alter table empdata add constraint primary key (empno);

Q: Insert values in empdata table with values where input is from keyboard.

Solution insert into empdata values (&empno, &ename, &sal);

Q: Create a copy of existing table emp without data.

Solution create table ABC as (select * from emp);

Q: Append a string _emp on employee name and display all the employees
with append name.

Solution select concat(ename, _emp) from emp;

Q: Trim the string from the right and display the trimmed name from emp table.

Solution select rtrim(concat(ename,_emp), _emp) from emp;

Q: Display the name of employees in uppercase from emp table.

Solution select ename, upper(ename) from emp;

Q: Display the name of employees in the lowercase from table.

Solution select ename, lower(ename) from emp;

Q: Display the length of employee name from emp table.

Solution select ename, length(ename) from emp;

Q: Display the first two letters of employee name from emp table.

Solution select ename, substr(ename,1,2) from emp;

Q: Display the employee name from emp table where length of emp name is
greater than 4.
MBA Weekend ITM LAB

Solution select ename from emp where length(ename) > 4;

Q: Find the position of first letter A in all the employee names in emp table.

Solution select ename, instr(ename,A,1,1) from emp;

Q: Find out the second occurrence of A in ename from emp table.

Solution select ename, instr(ename,A,2,1) from emp;

Q: Display the emp name from empp table where sound of employee name likes
JOHNS.

Solution select ename from emp where soundex(ename) = soundex(Johns);

HANDS ON SESSION

Q. List the details of all employees in departments 10 and 20 in alphabetical


order of name.
Solution SELECT * from emp where DEPTNO IN (10,20) order by ename ASC;

Q. List names of jobs of all clerks in department 20 in alphabetical order of name.


Solution Select ename, job from emp where DEPTNO IN (20) order by ename
ASC WHERE job in (Clerk);

Q. List names of all employees who have LL and TT in their names.


Solution select ename from emp where (ename like '%LL%' or ename like
'%TT%');

Q. List names and total remuneration for all employees.


Solution Select ename, sum(sal) from emp group by deptno;

Q. List name, annual salary and commission of all salespeople whose monthly
salary is greater than their commission. The output should be ordered by salary,
highest first. If two or more two employees have the same salary then sort by
employee name within the highest salary order.
MBA Weekend ITM LAB

Solution Select ename, 12*(sal+nvl(comm,0)) annualsal from emp order by


sal desc;

Q. List lower paid employees working for each manager. Sort the output by
salary.
Solution Select ename from emp where job=MANAGER' order by sal;

HANDS ON SESSION

Q. List all employees, their job and department number who are having same job
as that of any employee of department number 20.
Solution Select empno, ename, emp.deptno, job from emp, dept where job
in(select job from emp where emp.deptno=20;

Q. List all the employees, their salary and their increment using emp and incr
table.
Solution Select empno, ename, sal from emp where empno in(select empno,
incr from incr);

Q. Using self-join, list all employees having salary greater than or equal to
employee number 7788.
Solution SELECT e.ename, e.empno, e.sal, m.ename, m.sal as mgr, e.mgr
from emp e, emp m WHERE e.mgr = m.empno and e.salary >m.salary;

Q. Consider emp table, List all employees who earn less than the average salary
of all the employees.
Solution Select empno, ename, sal, deptno from emp e where sal<(select
avg(sal) from emp);

Q. List all employees name along with their managers name. Also list the name
of that employee who has no manager. (Employee King has no manager)
Solution Select distinct e.ename, m.mgr, m.Ename from emp e inner join
emp m on e.mgr = m.EmpID;

Q. Display the department that has no employee.


MBA Weekend ITM LAB

Solution Select d.dname from dept d where not exists (select * from emp e
where d.deptno = e.deptno);

Q. List the employee details who earn minimum salary for their job.
Solution Select ename from emp where sal=(select min(sal) from emp);

Q. List the ename, salary, deptno for those employees who earn greater than
average salary for their department. Sort the output in department number
order.
Solution Select ename, sal, deptno from emp where sal>(select avg(sal) from
dept order by deptno);

Q. List the employee details who earn highest salary for their job.
Solution select empno, ename, job from emp where sal=(select max(sal)
from emp);

Q. List the details of those employees who are among the five highest earners of
the company.
Solution select * from emp where sal in (select top 5 sal from emp order by
salary desc);

You might also like