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.
Answer Posted / 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
emp
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
where e1.deptno=e2.deptno);
Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
What is meant by a dispatcher?
My table got locked during mload due to a failed job. What do I do to perform other operations on it?
Why managing the data is important?
Differentiate primary key and partition key?
Discuss the advantages of using partitioned primary index in a query?
What is meant by a Clique?
What is meant by a node?
What are the available primary index types in teradata.
In a table can we use primary key in one column and in another column both unique and not null constrains.if yes how?
How does hashing happens in teradata?
What are the main components of teradata system?
What are the components provided on node?
If Fast Load Script fails and only the error tables are made available to you, then how will you restart?
Explain the term 'tables' related to relational database management system?
Write a program to show the parser component used in teradata?