Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Table E:
Name dept month sal
1 A JAN 800
2 B APR 1000
3 A JAN 300
4 A JAN 600
5 C JUN 400


1) SELECT HIGHEST SAL PAID DEPT IN JAN MONTH?
2) WRITE QUERY GET MAX SAL DEPT NO?

Answers were Sorted based on User's Feedback



Table E: Name dept month sal 1 A JAN 800 2 B APR 1000 3 A JAN 300 4 A JAN 600 5 C JUN 400 ..

Answer / parag

1) SELECT DISTINCT DEPT FROM TABLE
WHERE SAL >=
(SELECT MAX(SAL) FROM TABLE
WHERE MONTH = 'JAN');

2) SELECT DISTINCT DEPT, SAL FROM TABLE
WHERE SAL >=
(SELECT MAX(SAL) FROM TABLE);

Is This Answer Correct ?    3 Yes 1 No

Table E: Name dept month sal 1 A JAN 800 2 B APR 1000 3 A JAN 300 4 A JAN 600 5 C JUN 400 ..

Answer / suman rana

select dept from ( select dept,
max(sal) over() maxsal,
sal from ( select dept,
max(sal) sal
from E
where month=JAN'
group by dept
)
) WHERE maxsal = sal;


select distinct dept from ( select dept, max(sal) over ()
maxsal, sal
from E
)
where maxsal = sal;

Is This Answer Correct ?    0 Yes 0 No

Table E: Name dept month sal 1 A JAN 800 2 B APR 1000 3 A JAN 300 4 A JAN 600 5 C JUN 400 ..

Answer / venkateswara reddy

1)select dept from E where sal=(select max(sal) from E where
month='JAN')
2)select dept from E where sal=(select max(sal) from E)

Is This Answer Correct ?    0 Yes 1 No

Table E: Name dept month sal 1 A JAN 800 2 B APR 1000 3 A JAN 300 4 A JAN 600 5 C JUN 400 ..

Answer / shilpa

1) select dept , max(sal) from E where month=JAN';
2) select dept , max(sal) from E ;

Is This Answer Correct ?    1 Yes 2 No

Table E: Name dept month sal 1 A JAN 800 2 B APR 1000 3 A JAN 300 4 A JAN 600 5 C JUN 400 ..

Answer / shilpa

1) select dept , max(sal) from E where month=JAN';
2) select dept , max(sal) from E ;

Is This Answer Correct ?    1 Yes 3 No

Table E: Name dept month sal 1 A JAN 800 2 B APR 1000 3 A JAN 300 4 A JAN 600 5 C JUN 400 ..

Answer / mayur

select max(sal) from e where sal in (select month form e
where month = 'JAN';

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More Oracle General Interview Questions

What spfile/init.ora file parameter exists to force the CBO to make the execution path of a given statement use an index, even if the index scan may appear to be calculated as more costly?

0 Answers  


How many types of auditing in Oracle?

0 Answers   MCN Solutions,


Explain what are synonyms used for?

0 Answers  


Can you create a synonym without having a table?

0 Answers  


Can you drop an index associated with a unique or primary key constraint?

0 Answers  


what is cartesian product?

2 Answers  


What is a deadlock in SQL? How can you prevent it?

1 Answers  


how table is defined in plsql table? how can i select column from plsql table? can i use select * from plsql table type?

1 Answers  


1) What is ONE_SIZE_FITS_ALL approach? 2) Explain the Common & Variable Header of DATA FILE? 3) What are the Drawbacks to using OMF DB? and the Advantages? 4) List out the Advantages of Undo T.spaces over the Undo SEGMENT? 5) Difference between the Temporary tablespace with TEMPFILE and the Tablespace with TEMPORARY Keyword? 6) What are the situation extents are freeing for reuse.

0 Answers   TCS,


what is the output of select * from emp where null=null & select * from emp where 1=1

8 Answers   IMS Health, NIIT,


Explain joins in oracle?

0 Answers  


Respected sir, Please send me technical questions related to oracle apps..

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)