:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Databases >> SQL PLSQL


 Oracle interview questions  Oracle Interview Questions (2038)
 SQL Server interview questions  SQL Server Interview Questions (1078)
 MS Access interview questions  MS Access Interview Questions (25)
 MySQL interview questions  MySQL Interview Questions (194)
 Postgre interview questions  Postgre Interview Questions (6)
 Sybase interview questions  Sybase Interview Questions (22)
 DB Architecture interview questions  DB Architecture Interview Questions (5)
 DB Administration interview questions  DB Administration Interview Questions (213)
 DB Development interview questions  DB Development Interview Questions (53)
 SQL PLSQL interview questions  SQL PLSQL Interview Questions (775)
 Databases AllOther interview questions  Databases AllOther Interview Questions (107)
write a query to find out the no. of employees whose age is 
less than 25 and max of salary for the employees belonging 
to a particular department is less than 20000
 Question Submitted By :: SQL-PLSQL
I also faced this Question!!     Answer Posted By  
# 1
select dept,count(emp),max(sal)
from a
where age < 25
group by dept
having max(sal) < 20000
Is This Answer Correct ?    10 Yes 1 No
Khushbu Patel
# 2
Ignore my previous post. it is wrong.

select dept,count(emp),max(sal) from employee where age <25
group by dept having max(sal) <20000
Is This Answer Correct ?    1 Yes 0 No
Vikneswaran Thangarasu
# 3
select dept,count(emp),max(sal) from employee where age <25
and sal <20000 group by dept
Is This Answer Correct ?    1 Yes 1 No
Vikneswaran Thangarasu
# 4
select dept,count(emp) from employee where age <25 and max
(sal) <20000 group by dept.
Is This Answer Correct ?    3 Yes 4 No
# 5
There is little mistake in Nitin the MONTHS_BETWEEN
(SYSDATE,hiredate)should be stated like this because if we
place hiredate firt the output comes in Negative, so it
gives all record.

select DEPTno,COUNT(EMPno),max(SAL)
from EMP
where (TO_CHAR(sysdate,'yyyy') - TO_CHAR(HIREDATE,'yyyy'))
< 25
having max(sal) < 20000
Is This Answer Correct ?    1 Yes 2 No
# 6
SELECT department_id, COUNT(employee_id), MAX(salary)
FROM employees
GROUP BY department_id
HAVING MAX(salary) < 20000;
Is This Answer Correct ?    2 Yes 5 No
Nitin Umale

Other SQL PLSQL Interview Questions
  Question Asked @ Answers
what command is used to create a table by copying the structure of another table including constraints ? eicc 5
Do view contain data? Ramco 6
Differences between UNIQUE and DISTINCT in select statements Verinon-Technology-Solutions 25
Types of backups ? TCS 3
table - new_no old_no 2345 1234 3456 2345 5678 4567 output sud be -new_no 1234 2345 3456 4567 5678   2
Hi all, I am going to write oracle certification. Can anyone send me the dumps available if any for OCA exam? Its really very urgent, prompt response will help me alot..   7
what is an associative array with example?   1
What is the diffrence between IN and EXISTS.which one is faster. Infogain 2
Regarding joins what are the differences you observed in oracle 9i and sql server? Choice-Solutions 3
how can i read files from a pl/sq l program   3
can i use dbms_output.put_line in a function u are telling as return statement   7
how to get the third quarter of employee details from emp? CompuTech 2
For more SQL PLSQL Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::