TCS .net interview Questions, part-2
1)Code for updating the database by entering the data into textboxes in
aspx form?
2)How do you handle errors in stored procedures?
3)How did you implemented classes in your project?
4)How did you implemented interfaces in your project?
5)How did you call javascript from c#?
6)Differences between 1.1 and 2.0 versions of .net?
7)Caching types?
8)Session state modes?
9)what is the connection between IIS and client browser?
How do they communicate?
10)which session statemode u used in your current project?why?
11)How did you handle exceptions in sql server?
12)Two methos with same name in parent and inherited classes. If you create
an objct of child which method will be invoked?
13)Garbage colllector how it works in Background?
For other dot net interview Questions
Sqlqueires best practices
TCS Dotnet interview Questions Part1
HCL Dot net interview Questions
Prokarma Dotnet interview Questions
Mphasis Dotnet interview Questions
Sunday, December 12, 2010
TCS dot net interview Questions
TCS Dot net interview Questions, 3+ years of experince , Hyderabad ,part-1
1) How do u implement windows authentication, explain me each and every step in point of web.config and iis.
2) what is impersonization.
3) what is HTTP Handlers
4) What is http Modules
5) can we have our own extension of .net page i.e. for example
.asgx
6) what is Delay signing
7) what is Application pooling
8) Difference between finalize and dispose
9) Expalin Generics
10) Explain difference between Arraylist and Hashtable.
11) what is probing
12) what is multi targetting framework
13) what is difference between usercontrol and custom control
14) what is the difference between master page and user control.
15) how can we use old dll and new dll in our application
16) given some values and asked me to sort it in ascending order with out
using Array list methods like sort.
17) what is dataset and typed dataset.
18) what are the necessary steps u will take care to increase the performance of ur asp.net web application.
19) hOW do u find out errors in sql stored procedures.
20) how do u work with sqljobs.
21) Consider a scenario there are 2 systems in lan, one is ur local host and other is mine how do u access my database and tables.
22) do u know SSIS,SSRs.
23) what is dictionary and what is list and the differences between them
Hi Friends Please share your interview questions with me
Email id : nsubhash007@gmail.com
For Other Dotnet Interview Questions
Accenture Dot net interview Questions
Dell Dot net interview Questions
Value labs Dotnet interview Questions
Infotech enterprises Dotnet interview Questions
1) How do u implement windows authentication, explain me each and every step in point of web.config and iis.
2) what is impersonization.
3) what is HTTP Handlers
4) What is http Modules
5) can we have our own extension of .net page i.e. for example
.asgx
6) what is Delay signing
7) what is Application pooling
8) Difference between finalize and dispose
9) Expalin Generics
10) Explain difference between Arraylist and Hashtable.
11) what is probing
12) what is multi targetting framework
13) what is difference between usercontrol and custom control
14) what is the difference between master page and user control.
15) how can we use old dll and new dll in our application
16) given some values and asked me to sort it in ascending order with out
using Array list methods like sort.
17) what is dataset and typed dataset.
18) what are the necessary steps u will take care to increase the performance of ur asp.net web application.
19) hOW do u find out errors in sql stored procedures.
20) how do u work with sqljobs.
21) Consider a scenario there are 2 systems in lan, one is ur local host and other is mine how do u access my database and tables.
22) do u know SSIS,SSRs.
23) what is dictionary and what is list and the differences between them
Hi Friends Please share your interview questions with me
Email id : nsubhash007@gmail.com
For Other Dotnet Interview Questions
Accenture Dot net interview Questions
Dell Dot net interview Questions
Value labs Dotnet interview Questions
Infotech enterprises Dotnet interview Questions
Sunday, December 5, 2010
Sql Queries For Best Practices
Sql quires for Interview preparation and for best practices
Answers for the Sql queries
1. SQL > Select * from employee;
2. SQL > Select * from department;
3. SQL > Select * from job;
4. SQL > Select * from loc;
5. SQL > Select first_name, last_name, salary, commission from employee;
6. SQL > Select employee_id “id of the employee”, last_name “name", department id as “department id” from employee;
7. SQL > Select last_name, salary*12 “annual salary” from employee
8. SQL > Select * from employee where last_name=’SMITH’;
9. SQL > Select * from employee where department_id=20
10. SQL > Select * from employee where salary between 3000 and 4500
11. SQL > Select * from employee where department_id in (20,30)
12. SQL > Select last_name, salary, commission, department_id from employee where department_id not in (10,30)
13. SQL > Select * from employee where last_name like ‘S%’
14. SQL > Select * from employee where last_name like ‘S%H’
15. SQL > Select * from employee where last_name like ‘S___’
16. SQL > Select * from employee where department_id=10 and salary>3500
17. SQL > Select * from employee where commission is Null
18. SQL > Select employee_id, last_name from employee order by employee_id
19. SQL > Select employee_id, last_name, salary from employee order by salary desc
20. SQL > Select employee_id, last_name, salary from employee order by last_name, salary desc
21. SQL > Select employee_id, last_name, salary from employee order by last_name, department_id desc
22. SQL > Select department_id, count(*), from employee group by department_id
23. SQL > Select department_id, count(*), max(salary), min(salary), avg(salary) from employee group by department_id
24. SQL > Select job_id, count(*), max(salary), min(salary), avg(salary) from employee group by job_id
25. SQL > Select to_char(hire_date,’month’)month, count(*) from employee group by to_char(hire_date,’month’) order by month
26. SQL > Select to_char(hire_date,’yyyy’) Year, to_char(hire_date,’mon’) Month, count(*) “No. of employees” from employee group by to_char(hire_date,’yyyy’), to_char(hire_date,’mon’)
27. SQL > Select department_id, count(*) from employee group by department_id having count(*)>=4
28. SQL > Select to_char(hire_date,’mon’) month, count(*) from employee group by to_char(hire_date,’mon’) having to_char(hire_date,’mon’)=’jan’
29. SQL > Select to_char(hire_date,’mon’) month, count(*) from employee group by to_char(hire_date,’mon’) having to_char(hire_date,’mon’) in (‘jan’,’sep’)
30. SQL > Select to_char(hire_date,’yyyy’) Year, count(*) from employee group by to_char(hire_date,’yyyy’) having to_char(hire_date,’yyyy’)=1985
31. SQL > Select to_char(hire_date,’yyyy’)Year, to_char(hire_date,’mon’) Month, count(*) “No. of employees” from employee where to_char(hire_date,’yyyy’)=1985 group by to_char(hire_date,’yyyy’),to_char(hire_date,’mon’)
32. SQL > Select to_char(hire_date,’yyyy’)Year, to_char(hire_date,’mon’) Month, count(*) “No. of employees” from employee where to_char(hire_date,’yyyy’)=1985 and to_char(hire_date,’mon’)=’mar’ group by to_char(hire_date,’yyyy’),to_char(hire_date,’mon’)
33. SQL > Select department_id, count(*) “No. of employees” from employee where to_char(hire_date,’yyyy’)=1985 and to_char(hire_date,’mon’)=’apr’ group by to_char(hire_date,’yyyy’), to_char(hire_date,’mon’), department_id having count(*)>=3
34. SQL > Select * from employee where salary=(select max(salary) from employee)
35. SQL > Select * from employee where department_id IN (select department_id from department where name=’SALES’)
36. SQL > Select * from employee where job_id in (select job_id from job where function=’CLERK’
37. SQL > Select * from employee where department_id=(select department_id from department where location_id=(select location_id from location where regional_group=’New York’))
38. SQL > Select * from employee where department_id=(select department_id from department where name=’SALES’ group by department_id)
39. SQL > Update employee set salary=salary*10/100 wehre job_id=(select job_id from job where function=’CLERK’)
40. SQL > delete from employee where department_id=(select department_id from department where name=’ACCOUNTING’)
41. SQL > Select * from employee where salary=(select max(salary) from employee where salary <(select max(salary) from employee))
42. SQL > Select distinct e.salary from employee where & no-1=(select count(distinct salary) from employee where sal>e.salary)
43. SQL > Select * from employee where salary > all (Select salary from employee where department_id=30)
44. SQL > Select * from employee where salary > any (Select salary from employee where department_id=30)
45. SQL > Select employee_id, last_name, department_id from employee e where not exists (select department_id from department d where d.department_id=e.department_id)
46. SQL > Select name from department d where not exists (select last_name from employee e where d.department_id=e.department_id)
47. SQL > Select employee_id, last_name, salary, department_id from employee e where salary > (select avg(salary) from employee where department_id=e.department_id)
48. SQL > Select employee_id, last_name, name from employee e, department d where e.department_id=d.department_id
49. SQL > Select employee_id, last_name, function from employee e, job j where e.job_id=j.job_id
50. SQL > Select employee_id, last_name, name, regional_group from employee e, department d, location l where e.department_id=d.department_id and d.location_id=l.location_id
51. SQL > Select name, count(*) from employee e, department d where d.department_id=e.department_id group by name
52. SQL > Select name, count(*) from employee e, department d where d.department_id=e.department_id group by name having name=’SALES’
53. SQL > Select name, count(*) from employee e, department d where d.department_id=e.department_id group by name having count (*)>=5 order by name
54. SQL > Select function, count(*) from employee e, job j where j.job_id=e.job_id group by function
55. SQL > Select regional_group, count(*) from employee e, department d, location l where e.department_id=d.department_id and d.location_id=l.location_id and regional_group=’NEW YORK’ group by regional_group
56. SQL > Select employee_id, last_name, grade_id from employee e, salary_grade s where salary between lower_bound and upper_bound order by last_name
57. SQL > Select grade_id, count(*) from employee e, salary_grade s where salary between lower_bound and upper_bound group by grade_id order by grade_id desc
58. SQL > Select grade_id, count(*) from employee e, salary_grade s where salary between lower_bound and upper_bound and lower_bound>=2000 and lower_bound<=5000 group by grade_id order by grade_id desc
59. SQL > Select e.last_name emp_name, m.last_name, mgr_name from employee e, employee m where e.manager_id=m.employee_id
60. SQL > Select e.last_name emp_name, e.salary emp_salary, m.last_name, mgr_name, m.salary mgr_salary from employee e, employee m where e.manager_id=m.employee_id and m.salary
61. SQL > Select m.manager_id, count(*) from employee e, employee m where e.employee_id=m.manager_id group by m.manager_id
62. SQL > Select last_name, d.department_id, d.name from employee e, department d where e.department_id(+)=d.department_id
63. SQL > Select last_name, d.department_id, d.name from employee e, department d where e.department_id(+)=d.department_id and d.department_idin (select department_id from department where name IN (‘SALES’,’OPERATIONS’))
64. SQL > Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’SALES’)) union Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’ACCOUNTING’))
65. SQL > Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’SALES’)) union all Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’ACCOUNTING’))
66. SQL > Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’RESEARCH’)) intersect Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’ACCOUNTING’)) order by function
Answers for the Sql queries
1. SQL > Select * from employee;
2. SQL > Select * from department;
3. SQL > Select * from job;
4. SQL > Select * from loc;
5. SQL > Select first_name, last_name, salary, commission from employee;
6. SQL > Select employee_id “id of the employee”, last_name “name", department id as “department id” from employee;
7. SQL > Select last_name, salary*12 “annual salary” from employee
8. SQL > Select * from employee where last_name=’SMITH’;
9. SQL > Select * from employee where department_id=20
10. SQL > Select * from employee where salary between 3000 and 4500
11. SQL > Select * from employee where department_id in (20,30)
12. SQL > Select last_name, salary, commission, department_id from employee where department_id not in (10,30)
13. SQL > Select * from employee where last_name like ‘S%’
14. SQL > Select * from employee where last_name like ‘S%H’
15. SQL > Select * from employee where last_name like ‘S___’
16. SQL > Select * from employee where department_id=10 and salary>3500
17. SQL > Select * from employee where commission is Null
18. SQL > Select employee_id, last_name from employee order by employee_id
19. SQL > Select employee_id, last_name, salary from employee order by salary desc
20. SQL > Select employee_id, last_name, salary from employee order by last_name, salary desc
21. SQL > Select employee_id, last_name, salary from employee order by last_name, department_id desc
22. SQL > Select department_id, count(*), from employee group by department_id
23. SQL > Select department_id, count(*), max(salary), min(salary), avg(salary) from employee group by department_id
24. SQL > Select job_id, count(*), max(salary), min(salary), avg(salary) from employee group by job_id
25. SQL > Select to_char(hire_date,’month’)month, count(*) from employee group by to_char(hire_date,’month’) order by month
26. SQL > Select to_char(hire_date,’yyyy’) Year, to_char(hire_date,’mon’) Month, count(*) “No. of employees” from employee group by to_char(hire_date,’yyyy’), to_char(hire_date,’mon’)
27. SQL > Select department_id, count(*) from employee group by department_id having count(*)>=4
28. SQL > Select to_char(hire_date,’mon’) month, count(*) from employee group by to_char(hire_date,’mon’) having to_char(hire_date,’mon’)=’jan’
29. SQL > Select to_char(hire_date,’mon’) month, count(*) from employee group by to_char(hire_date,’mon’) having to_char(hire_date,’mon’) in (‘jan’,’sep’)
30. SQL > Select to_char(hire_date,’yyyy’) Year, count(*) from employee group by to_char(hire_date,’yyyy’) having to_char(hire_date,’yyyy’)=1985
31. SQL > Select to_char(hire_date,’yyyy’)Year, to_char(hire_date,’mon’) Month, count(*) “No. of employees” from employee where to_char(hire_date,’yyyy’)=1985 group by to_char(hire_date,’yyyy’),to_char(hire_date,’mon’)
32. SQL > Select to_char(hire_date,’yyyy’)Year, to_char(hire_date,’mon’) Month, count(*) “No. of employees” from employee where to_char(hire_date,’yyyy’)=1985 and to_char(hire_date,’mon’)=’mar’ group by to_char(hire_date,’yyyy’),to_char(hire_date,’mon’)
33. SQL > Select department_id, count(*) “No. of employees” from employee where to_char(hire_date,’yyyy’)=1985 and to_char(hire_date,’mon’)=’apr’ group by to_char(hire_date,’yyyy’), to_char(hire_date,’mon’), department_id having count(*)>=3
34. SQL > Select * from employee where salary=(select max(salary) from employee)
35. SQL > Select * from employee where department_id IN (select department_id from department where name=’SALES’)
36. SQL > Select * from employee where job_id in (select job_id from job where function=’CLERK’
37. SQL > Select * from employee where department_id=(select department_id from department where location_id=(select location_id from location where regional_group=’New York’))
38. SQL > Select * from employee where department_id=(select department_id from department where name=’SALES’ group by department_id)
39. SQL > Update employee set salary=salary*10/100 wehre job_id=(select job_id from job where function=’CLERK’)
40. SQL > delete from employee where department_id=(select department_id from department where name=’ACCOUNTING’)
41. SQL > Select * from employee where salary=(select max(salary) from employee where salary <(select max(salary) from employee))
42. SQL > Select distinct e.salary from employee where & no-1=(select count(distinct salary) from employee where sal>e.salary)
43. SQL > Select * from employee where salary > all (Select salary from employee where department_id=30)
44. SQL > Select * from employee where salary > any (Select salary from employee where department_id=30)
45. SQL > Select employee_id, last_name, department_id from employee e where not exists (select department_id from department d where d.department_id=e.department_id)
46. SQL > Select name from department d where not exists (select last_name from employee e where d.department_id=e.department_id)
47. SQL > Select employee_id, last_name, salary, department_id from employee e where salary > (select avg(salary) from employee where department_id=e.department_id)
48. SQL > Select employee_id, last_name, name from employee e, department d where e.department_id=d.department_id
49. SQL > Select employee_id, last_name, function from employee e, job j where e.job_id=j.job_id
50. SQL > Select employee_id, last_name, name, regional_group from employee e, department d, location l where e.department_id=d.department_id and d.location_id=l.location_id
51. SQL > Select name, count(*) from employee e, department d where d.department_id=e.department_id group by name
52. SQL > Select name, count(*) from employee e, department d where d.department_id=e.department_id group by name having name=’SALES’
53. SQL > Select name, count(*) from employee e, department d where d.department_id=e.department_id group by name having count (*)>=5 order by name
54. SQL > Select function, count(*) from employee e, job j where j.job_id=e.job_id group by function
55. SQL > Select regional_group, count(*) from employee e, department d, location l where e.department_id=d.department_id and d.location_id=l.location_id and regional_group=’NEW YORK’ group by regional_group
56. SQL > Select employee_id, last_name, grade_id from employee e, salary_grade s where salary between lower_bound and upper_bound order by last_name
57. SQL > Select grade_id, count(*) from employee e, salary_grade s where salary between lower_bound and upper_bound group by grade_id order by grade_id desc
58. SQL > Select grade_id, count(*) from employee e, salary_grade s where salary between lower_bound and upper_bound and lower_bound>=2000 and lower_bound<=5000 group by grade_id order by grade_id desc
59. SQL > Select e.last_name emp_name, m.last_name, mgr_name from employee e, employee m where e.manager_id=m.employee_id
60. SQL > Select e.last_name emp_name, e.salary emp_salary, m.last_name, mgr_name, m.salary mgr_salary from employee e, employee m where e.manager_id=m.employee_id and m.salary
61. SQL > Select m.manager_id, count(*) from employee e, employee m where e.employee_id=m.manager_id group by m.manager_id
62. SQL > Select last_name, d.department_id, d.name from employee e, department d where e.department_id(+)=d.department_id
63. SQL > Select last_name, d.department_id, d.name from employee e, department d where e.department_id(+)=d.department_id and d.department_idin (select department_id from department where name IN (‘SALES’,’OPERATIONS’))
64. SQL > Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’SALES’)) union Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’ACCOUNTING’))
65. SQL > Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’SALES’)) union all Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’ACCOUNTING’))
66. SQL > Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’RESEARCH’)) intersect Select function from job where job_id in (Select job_id from employee where department_id=(select department_id from department where name=’ACCOUNTING’)) order by function
Thursday, December 2, 2010
Sample Sql Queries For Practices
Sample Sql Queries for best practices
Create the following Tables:
Table1 :Location
Table2 :Department
Table 3: Job
Table 4: Employee
http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Simple Queries:
1. List all the employee details
2. List all the department details
3. List all job details
4. List all the locations
5. List out first name,last name,salary, commission for all employees
6. List out employee_id,last name,department id for all employees and rename employee id as “ID of the employee”, last name as “Name of the employee”, department id as “department ID”
7. List out the employees anuual salary with their names only.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Where Conditions:
8. List the details about “SMITH”
9. List out the employees who are working in department 20
10. List out the employees who are earning salary between 3000 and 4500
11. List out the employees who are working in department 10 or 20
12. Find out the employees who are not working in department 10 or 30
13. List out the employees whose name starts with “S”
14. List out the employees whose name start with “S” and end with “H”
15. List out the employees whose name length is 4 and start with “S”
16. List out the employees who are working in department 10 and draw the salaries more than 3500
17. list out the employees who are not receiving commission.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Order By Clause:
18. List out the employee id, last name in ascending order based on the employee id.
19. List out the employee id, name in descending order based on salary column
20. list out the employee details according to their last_name in ascending order and salaries in descending order
21. list out the employee details according to their last_name in ascending order and then on department_id in descending order.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Group By & Having Clause:
22. How many employees who are working in different departments wise in the organization
23. List out the department wise maximum salary, minimum salary, average salary of the employees
24. List out the job wise maximum salary, minimum salary, average salaries of the employees.
25. List out the no.of employees joined in every month in ascending order.
26. List out the no.of employees for each month and year, in the ascending order based on the year, month.
27. List out the department id having atleast four employees.
28. How many employees in January month.
29. How many employees who are joined in January or September month.
30. How many employees who are joined in 1985.
31. How many employees joined each month in 1985.
32. How many employees who are joined in March 1985.
33. Which is the department id, having greater than or equal to 3 employees joined in April 1985.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Sub-Queries
34. Display the employee who got the maximum salary.
35. Display the employees who are working in Sales department
36. Display the employees who are working as “Clerk”.
37. Display the employees who are working in “New York”
38. Find out no.of employees working in “Sales” department.
39. Update the employees salaries, who are working as Clerk on the basis of 10%.
40. Delete the employees who are working in accounting department.
41. Display the second highest salary drawing employee details.
42. Display the Nth highest salary drawing employee details.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Sub-Query operators: (ALL,ANY,SOME,EXISTS)
43. List out the employees who earn more than every employee in department 30.
44. List out the employees who earn more than the lowest salary in department 30.
45. Find out whose department has not employees.
46. Find out which department does not have any employees.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Co-Related Sub Queries:
47.Find out the employees who earn greater than the average salary for their department.
Joins
Simple join
48.List our employees with their department names
49.Display employees with their designations (jobs)
50.Display the employees with their department name and regional groups.
51.How many employees who are working in different departments and display with department name.
52.How many employees who are working in sales department.
53.Which is the department having greater than or equal to 5 employees and display the department names in ascending order.
54.How many jobs in the organization with designations.
55.How many employees working in “New York”.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Non – Equi Join:
56.Display employee details with salary grades.
57.List out the no. of employees on grade wise.
58.Display the employ salary grades and no. of employees between 2000 to 5000 range of salary.
Self Join:
59.Display the employee details with their manager names.
60.Display the employee details who earn more than their managers salaries.
61.Show the no. of employees working under every manager.
Outer Join:
61.Display employee details with all departments.
62.Display all employees in sales or operation departments.
Set Operators:
63.List out the distinct jobs in Sales and Accounting Departments.
64.List out the ALL jobs in Sales and Accounting Departments.
65.List out the common jobs in Research and Accounting Departments in ascending order.
Create the following Tables:
Table1 :Location
Table2 :Department
Table 3: Job
Table 4: Employee
http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Simple Queries:
1. List all the employee details
2. List all the department details
3. List all job details
4. List all the locations
5. List out first name,last name,salary, commission for all employees
6. List out employee_id,last name,department id for all employees and rename employee id as “ID of the employee”, last name as “Name of the employee”, department id as “department ID”
7. List out the employees anuual salary with their names only.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Where Conditions:
8. List the details about “SMITH”
9. List out the employees who are working in department 20
10. List out the employees who are earning salary between 3000 and 4500
11. List out the employees who are working in department 10 or 20
12. Find out the employees who are not working in department 10 or 30
13. List out the employees whose name starts with “S”
14. List out the employees whose name start with “S” and end with “H”
15. List out the employees whose name length is 4 and start with “S”
16. List out the employees who are working in department 10 and draw the salaries more than 3500
17. list out the employees who are not receiving commission.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Order By Clause:
18. List out the employee id, last name in ascending order based on the employee id.
19. List out the employee id, name in descending order based on salary column
20. list out the employee details according to their last_name in ascending order and salaries in descending order
21. list out the employee details according to their last_name in ascending order and then on department_id in descending order.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Group By & Having Clause:
22. How many employees who are working in different departments wise in the organization
23. List out the department wise maximum salary, minimum salary, average salary of the employees
24. List out the job wise maximum salary, minimum salary, average salaries of the employees.
25. List out the no.of employees joined in every month in ascending order.
26. List out the no.of employees for each month and year, in the ascending order based on the year, month.
27. List out the department id having atleast four employees.
28. How many employees in January month.
29. How many employees who are joined in January or September month.
30. How many employees who are joined in 1985.
31. How many employees joined each month in 1985.
32. How many employees who are joined in March 1985.
33. Which is the department id, having greater than or equal to 3 employees joined in April 1985.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Sub-Queries
34. Display the employee who got the maximum salary.
35. Display the employees who are working in Sales department
36. Display the employees who are working as “Clerk”.
37. Display the employees who are working in “New York”
38. Find out no.of employees working in “Sales” department.
39. Update the employees salaries, who are working as Clerk on the basis of 10%.
40. Delete the employees who are working in accounting department.
41. Display the second highest salary drawing employee details.
42. Display the Nth highest salary drawing employee details.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Sub-Query operators: (ALL,ANY,SOME,EXISTS)
43. List out the employees who earn more than every employee in department 30.
44. List out the employees who earn more than the lowest salary in department 30.
45. Find out whose department has not employees.
46. Find out which department does not have any employees.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Co-Related Sub Queries:
47.Find out the employees who earn greater than the average salary for their department.
Joins
Simple join
48.List our employees with their department names
49.Display employees with their designations (jobs)
50.Display the employees with their department name and regional groups.
51.How many employees who are working in different departments and display with department name.
52.How many employees who are working in sales department.
53.Which is the department having greater than or equal to 5 employees and display the department names in ascending order.
54.How many jobs in the organization with designations.
55.How many employees working in “New York”.
For Answers : http://subhashnetworld.blogspot.com/2010/12/sql-queries-for-best-practices.html
Non – Equi Join:
56.Display employee details with salary grades.
57.List out the no. of employees on grade wise.
58.Display the employ salary grades and no. of employees between 2000 to 5000 range of salary.
Self Join:
59.Display the employee details with their manager names.
60.Display the employee details who earn more than their managers salaries.
61.Show the no. of employees working under every manager.
Outer Join:
61.Display employee details with all departments.
62.Display all employees in sales or operation departments.
Set Operators:
63.List out the distinct jobs in Sales and Accounting Departments.
64.List out the ALL jobs in Sales and Accounting Departments.
65.List out the common jobs in Research and Accounting Departments in ascending order.
Subscribe to:
Posts
(
Atom
)