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.
Answer Posted / anil pednekar
select table1.ename from (select deptno, max(sal) as sal1
from table1 group by deptno having deptno in(1,2)) as T1,
table1 where T1.deptno=table1.deptno and
T1.sal1=table1.sal
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are different sql data types?
Write a sql select query that only returns each name only once from a table?
What are expressions?
What is the purpose of normalization?
How do I sort a table in sql?
What is union, minus and interact commands?
what are the different type of normalization? : Sql dba
What is meaning of <> in sql?
How does index help in query performance?
What is sql analyzer?
Are stored procedures compiled?
Which are the different types of indexes in sql?
What is a dynamic query?
what are the join types in tsql? : Transact sql
How is use pl and sql?