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

Answers were Sorted based on User's Feedback

we have two tables emp,dept.emp has eno,ename,sal and dept has deptno,dname.how to find maxsal of e..

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

we have two tables emp,dept.emp has eno,ename,sal and dept has deptno,dname.how to find maxsal of e..

Prerequisite
-------------
Both emp and dept tables should have deptno column

select depno,max(sal)
from emp e,dept d
where e.deptno=d.deptno
group by deptno;

 Is This Answer Correct ? 14 Yes 5 No

we have two tables emp,dept.emp has eno,ename,sal and dept has deptno,dname.how to find maxsal of e..

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

we have two tables emp,dept.emp has eno,ename,sal and dept has deptno,dname.how to find maxsal of e..

emp table having depnto and dept table contains deptno
then only we can join the two table and find out max sal
dept wise
query:
select e.deptno,d.dname,max(e.sal) from emp e,dept d
where d.deptno=e.deptno
group by e.deptno,d.dname

 Is This Answer Correct ? 5 Yes 1 No

we have two tables emp,dept.emp has eno,ename,sal and dept has deptno,dname.how to find maxsal of e..

with out using any Join conditions

Select deptno, max(sal)
from emp group by deptno

 Is This Answer Correct ? 3 Yes 0 No

What is the use of teradata system software?

Why MultiLoad Utility supports only Non Unique Secondary Index(NUSI) in the Target Table ?

i have a table like sales....the field are Prodid Jan(jam month sales)Feb March apr may jun july 1 20 76 50 74 94 93 83 2 30 94 40 94 93 93 02 3 40 90 30 49 94 92 56 4 70 20 30 93 46 35 78 5 23 40 40 39 84 46 57 6 85 30 55 93 46 46 46 7 84 20 65 83 56 57 57 8 10 93 40 93 68 57 36 9 57 30 30 83 67 57 79 10 38 83 40 83 55 68 47 11 35 39 90 94 57 78 47 12 83 89 50 93 79 69 69 i wat ti find the max sales of every product which i want to load into target table

What is a pseudo key? What is its use???

Explain how spool space is used.

What are the uses of bynets in multi-node systems?

hi frnds i want to learn teradata utilities and teradata dba real time. i have 1+ years of experience in teradata. so i want to go deeply in Tearada. plz let me know at my email id who r best to learn from. im lookng for a realtime guy in HYD or Banglr. Thanks in advance. Rajesh my email-id: rajeshmss87@gmail.com

what is amp plz explanation

Hello all, There is a table with 4 columns in that 3 columns has been already loaded with 5 million records.4th column is empty,Now I have got 5 million records data which has to be loaded into 4th column.How can I load this data fastly in to the 4th column with out using update

What are the different design perspectives used in teradata?

List out all forms of LOCKS that are available in Teradata.

Hi send me the Teradata dumps to my id rajeshanantha@yahoo.co.in Thanks Rajesh. A

Categories