Query Examples

Query Examples

Postby admin » Fri Mar 23, 2012 2:31 am

1. Write a query to find 36th max salary of 100 employees?
2. How to retrieve and display only the duplicate values?
admin
Site Admin
 
Posts: 83
Joined: Sat Dec 03, 2011 2:10 pm

Re: Query Examples

Postby pooja » Fri Apr 13, 2012 3:55 pm

select max(salary) from employee where rownum=36 order by salary Desc;

Just a try
pooja
 
Posts: 4
Joined: Wed Apr 11, 2012 1:43 am

Re: Query Examples

Postby hemangims » Tue May 08, 2012 8:54 pm

Query for duplicate values

select column_name, count(column_name) as dupcount
from tablename
group by column_name
having (count(column_name)>1)

Pl. correct if I'm wrong....
hemangims
 
Posts: 17
Joined: Sat Apr 28, 2012 12:30 am


Return to SQL | RDBMS | Database Queries

Who is online

Users browsing this forum: No registered users and 1 guest