HOPE THIS WORKS.....
SELECT * FROM t1 A
WHERE ROWNUM = (SELECT MAX(ROWNUM) FROM t1 C WHERE C.COL3=A.COL3 GROUP BY C.COL2 )...
User Profile
Collapse
-
if any problem occurs u can post it here...
regards,
feby felix mathewLeave a comment:
-
HOPE IT WORKS....
SELECT T1.YEAR,T1.GREA DE,T1.SAL,
LAG(T1.SAL,1) OVER (ORDER BY YEAR) PREV_SAL,
T1.SAL-( LAG(T1.SAL,1) OVER (ORDER BY YEAR) ) SAL_DIFRNCE
FROM T1 WHERE T1.YEAR=2008
do post if any doubt is there....Leave a comment:
-
This Will Give The Output......
Select C.empno,t.deptn o From Feb_emp C ,
(
Select Min(a.empno) Empno,a.deptno From Feb_emp A
Group By A.deptno
)t
Where C.empno=t.empno (+)
Order By C.empnoLeave a comment:
-
-
you can use the UTL_FILe in oracle. search for UTL_FILE in google and you will get realtime examples.Leave a comment:
-
-
TABLE IS
SELECT * FROM FEB_ORD;
ORD CUST
----------- -----------
123 2456
354 2456
657 2489
858 2447
955 2489
THE QUERY IS
------------------------------
SELECT T.CUST,T.ORD,(C ASE WHEN T.CUST=T.LEAD_1 _CUST THEN LEAD_1_ORD ...Leave a comment:
No activity results to display
Show More
Leave a comment: