we have two tables emp,dept.emp has eno,ename,sal and dept
has deptno,dname.how to find maxsal of each dept wise.which
join used for joining.
Answers were Sorted based on User's Feedback
Answer / priya
AS emp table doesnt have a field as deptno so we cant find
a maxsal of each dept wise, as no common field is used
|Is This Answer Correct ?||12 Yes||0 No|
Answer / ram reddy
Both emp and dept tables should have deptno column
from emp e,dept d
group by deptno;
|Is This Answer Correct ?||14 Yes||5 No|
Answer / yuvaevergreen
Since there is no common column, it may not be possible to
join two tables.
if deptno is in emp table, correlated query can be used
eno ename sal deptno
1 yuva 10 tn1
2 yuv1 20 tn2
3 yuv3 30 tn1
select * from emp as e1
where sal in
(sel max(sal) from emp as e2
|Is This Answer Correct ?||10 Yes||1 No|
Answer / kondeti srinivas
emp table having depnto and dept table contains deptno
then only we can join the two table and find out max sal
select e.deptno,d.dname,max(e.sal) from emp e,dept d
group by e.deptno,d.dname
|Is This Answer Correct ?||5 Yes||1 No|
Answer / subbareddy kake
with out using any Join conditions
Select deptno, max(sal)
from emp group by deptno
|Is This Answer Correct ?||3 Yes||0 No|
can we load 10 millions of records into target table by using tpump?
What is the particular designated level at which a LOCK is liable to be applied in Teradata?
what is the difference between primary index and secondary index?.
where we can use the delimiter in mload? pls let me know
What interface is used to connect to windows based applications?
What is the meaning of Caching in Teradata?
What is dimensional modeling?
what is the query for retrieve the unique values(not display the duplicates values) from single table?
What do you mean by teradata intelliflex?
how to delete duplicate records in multi set table without using any tables
What is differnce between Error code and Error Level in Bteq
how to load or extract the error table data ?