Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.

Answers were Sorted based on User's Feedback



consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / avinash

select ename from emp where sal in(select max(sal) from
emp) and deptno in(10,20)

Is This Answer Correct ?    0 Yes 0 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / sanjeev

SELECT ENAME FROM TABLE NAME WHERE SAL>(SELECT MAX(SAL)
FROM TABLE NAME GROUP BY DEPTNO

Is This Answer Correct ?    0 Yes 0 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / praveen reddy.eddula

select ename from emp where sal in(select max(sal) from emp
where deptno in(10,20))

Is This Answer Correct ?    0 Yes 0 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / swati pise

select top 1 * from table where dept_no in(10,20) order by
sal desc

Is This Answer Correct ?    0 Yes 0 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / swati

select top 1 ename from emp where deptno in(10,20) order by
sal desc

Is This Answer Correct ?    0 Yes 0 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / lipika

Select Ename From emp where sal in (Select Max(Sal) From
emp where deptno in (10,20) group by deptno);

Is This Answer Correct ?    0 Yes 0 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / john

select dept_id,ename max(sal) from employee where dept_id
in ('1','2') group by dept_id;

Is This Answer Correct ?    0 Yes 0 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / pratdeor

Select ename from table where sal IN
(select Max(sal) over (partition by Deptno) as mxs from table) and Deptno IN (10,20);

Is This Answer Correct ?    0 Yes 0 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / gautam

select ename,sal from emp
where sal in (select max(sal) from emp group by deptno)
and deptno in (10,20)

Gautam

Is This Answer Correct ?    3 Yes 4 No

consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ..

Answer / sp

select top 2 ename, salary, dept from dbo.employee where
dept in(10,20) order by salary desc

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

how are mysql timestamps seen to a user? : Sql dba

0 Answers  


What is t-sql? : Transact sql

0 Answers  


what is the difference between rownum pseudo column and row_number() function? : Sql dba

0 Answers  


What is memory optimized table?

0 Answers  


How to execute a stored procedure?

0 Answers  


What is sharding in sql?

0 Answers  


What will you get by the cursor attribute sql%notfound?

0 Answers  


how to select alphabets in a one column , for this the table name is PA_TASKS and column name is TASK_NUMBER, In TASK_NUMBER the data like this 1.1.3NN,1.1.4NN,1.5.1NN,1.3.2NE,1.5NN,1NN,1.2NE,1CE , For this i need to disply output as NN,NN,NN,NE,NN,NN,NE,CE, Its some urgent requirement ,thanks in advance

6 Answers  


what are all the common sql function? : Sql dba

0 Answers  


How toimport .dmp file in lower version of oracle from higher version ?

4 Answers   TCS,


What is crud sql?

0 Answers  


Explain the concept of normalization.

3 Answers  


Categories