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
How do you do backup and recovery in teradata?
What is smp and mpp platforms?
What are different table types used in teradata?
What are default access rights in teradata? What explicit right can be given to a user?
Explain teradata vs. Redshift?
Differentiate primary key and partition key?
What are the components used in smp and massively parallel processing (mpp) machines?
What is spool space and when running a job if it reaches the maximum spool space how you solve the problem?
how do we write scripts in unix how to execute scripts in real time anybody please needfull or give me number i will cal u
What is called partitioned primary index (ppi)?
What are the available join types in teradata?
How is MLOAD Client System restarted after execution?
What is the purpose of using case expression in teradata?
If Fast Load Script fails and only the error tables are made available to you, then how will you restart?
What is the maximum number of dml can be coded in a multiload script?