Jump to content

Recommended Posts

Posted

ok ok......

subquery no or In-Line view no antaru.. word gurthuledu 

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • chandra916

    16

  • mettastar

    9

  • Vinuu

    8

  • electionszindabad

    3

Popular Days

Top Posters In This Topic

Posted

subquery no or In-Line view no antaru.. word gurthuledu 

inline view anukunta......chi dhenamma jeevitham anduke eeroju cheppe class notes eeroje saduvukovali ani.....lekapothe emi gurthundadu

Posted
EMPLOYEE AND DEPARMENT ARE 2 DIFFERENT TABLES
 
 
select DEP.DEPT_NO,
  E.EMPLOYEE_ID,
  DEP.DEPT_NAME,
  E.SAL
from EMPLOYEES E
inner join
(
  select max(E.SAL) MaxSalary,DEP.DEPT_NO,DEP.DEPT_NAME,
  from EMPLOYEES E
  inner join DEPARMENTS D
     on E.DEPT_NO= DEP.DEPT_NO
  group by DEP.DEPT_NO,DEP.DEPT_NAME
  on E.SAL= DEP.MAXSALARY
  and E.DEPT_NO= DEP.DEPT_NO
WHERE DEP.DEPT_NO IN (10,20)
order by DEP.DEPT_NO
Posted

inline view anukunta......chi dhenamma jeevitham anduke eeroju cheppe class notes eeroje saduvukovali ani.....lekapothe emi gurthundadu

concept thelisthe chaalu bro.. practice cheyi manchiga ilanti exercise lu useful avuthayi and different approaches kuda thelusthayi

Posted

 

EMPLOYEE AND DEPARMENT ARE 2 DIFFERENT TABLES
 
 
select DEP.DEPT_NO,
  E.EMPLOYEE_ID,
  DEP.DEPT_NAME,
  E.SAL
from EMPLOYEES E
inner join
(
  select max(E.SAL) MaxSalary,DEP.DEPT_NO,DEP.DEPT_NAME,
  from EMPLOYEES E
  inner join DEPARMENTS D
     on E.DEPT_NO= DEP.DEPT_NO
  group by DEP.DEPT_NO,DEP.DEPT_NAME
  on E.SAL= DEP.MAXSALARY
  and E.DEPT_NO= DEP.DEPT_NO
WHERE DEP.DEPT_NO IN (10,20)
order by DEP.DEPT_NO

 

deptno kuda same table lo vuntadi kadha....

Posted

deptno kuda same table lo vuntadi kadha....

mee table structure pm cheyandi....like the columns in it

Posted

 

EMPLOYEE AND DEPARMENT ARE 2 DIFFERENT TABLES
 
 
select DEP.DEPT_NO,
  E.EMPLOYEE_ID,
  DEP.DEPT_NAME,
  E.SAL
from EMPLOYEES E
inner join
(
  select max(E.SAL) MaxSalary,DEP.DEPT_NO,DEP.DEPT_NAME,
  from EMPLOYEES E
  inner join DEPARMENTS D
     on E.DEPT_NO= DEP.DEPT_NO
  group by DEP.DEPT_NO,DEP.DEPT_NAME
  on E.SAL= DEP.MAXSALARY
  and E.DEPT_NO= DEP.DEPT_NO
WHERE DEP.DEPT_NO IN (10,20)
order by DEP.DEPT_NO

 

exactly... i was thinking in these terms an hence max and group by popped in my mind...

Posted

mee table structure pm cheyandi....like the columns in it

oracle 11g install chesinappudu deafult tables isthadu kadha

EMP table adhe.....

Posted

oracle 11g install chesinappudu deafult tables isthadu kadha

EMP table adhe.....

ok

Posted

bookmark chesthunna thread ni.....replyes ivandi repu morning nenu try chesina thrawatha naaku vasthe na query post chestha

Posted
 select ename,sal,deptno from emp
  where sal in(select max(sal) from emp where deptno in (10,20) group by deptno);
 
ENAME             SAL     DEPTNO
---------- ---------- ----------
SCOTT            3000         20
KING             5000         10
FORD             3000         20
Posted

oracle 11g install chesinappudu deafult tables isthadu kadha

EMP table adhe.....

SELECT EMPLOYEE_ID,
DEPT_ID,
EMPLOYEE_NAME,
MAX(SALARY)  MAX_SALARY
FROM EMPLOYEES 
WHERE DEPT_ID IN 10,20
GROUP BY EMPLOYEE_ID,DEPT_ID 
Posted

 

SELECT EMPLOYEE_ID,
DEPT_ID,
EMPLOYEE_NAME,
MAX(SALARY)  MAX_SALARY
FROM EMPLOYEES 
WHERE DEPT_ID IN 10,20
GROUP BY EMPLOYEE_ID,DEPT_ID 

 

nenu already rasesa....naku employee name kavali 

Posted

 

SELECT EMPLOYEE_ID,
DEPT_ID,
EMPLOYEE_NAME,
MAX(SALARY)  MAX_SALARY
FROM EMPLOYEES 
WHERE DEPT_ID IN 10,20
GROUP BY EMPLOYEE_ID,DEPT_ID 

 

ename daggara error vasthundi not a group by xpression ani

×
×
  • Create New...