3rd largest salary in each department.

Hi all,
I need to find the third largest salary in each dept in the emp table.
Can anyone give me the query.
regards,
prem

SQL> select empno, ename, deptno, funny_requirement_salary from
  2  (select empno, ename, deptno, rank() over (partition by deptno order by sal DESC) rn, sal funny_requirement_salary from emp)
  3  where rn = 3
  4  /
     EMPNO ENAME          DEPTNO FUNNY_REQUIREMENT_SALARY
      7934 MILLER             10                     1300
      7566 JONES              20                     2975
      7844 TURNER             30                     1500                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • QUERY FOR FINDING SECOND HIGEST SALARY IN EACH DEPARTMENT...?

    Hi ,
    if anyone know query..please mail to my id ...[email protected]

    Hi,
    (a) Use the analytic DENSE_RANK function (or ROW_NUMBER, depending on how you want to treat ties) to number every row, showing how each one ranks within its deparment.
    (b) Then choose the ones that were assigned 2 as their rank.
    Step (a) will have to be done in a sub-query and step (b) in the main query, since analytic functions are computed after the WHERE-clause is done.

  • How to display the some extra text in footer last page of each department

    Hello Experts,
    I need help in generating RTF template to generate sum of salary for each department in the footer of the last page of each department name As shown below.
    Total salary of <DEPARTMENT_NAME>=<Sum of salary>.
    Someone plese help me.
    For example:
    If my output is displaying in multiple pages for each department I want the output should be as follows in the footer of last page of current group
    *Total Salary of Accounting = _20300_*
    My xml file is as follows*
    <?xml version="1.0" standalone="yes"?>
    <ROWSET>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Den</FIRST_NAME>
    <JOB_ID>PU_MAN</JOB_ID>
    <SALARY>11000</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Alexander</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>3100</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Shelli</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>2900</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Sigal</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>2800</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Guy</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>2600</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Karen</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>2500</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Nancy</FIRST_NAME>
    <JOB_ID>FI_MGR</JOB_ID>
    <SALARY>12000</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Daniel</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>9000</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>John</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>8200</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Ismael</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>7700</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Jose Manuel</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>7800</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Luis</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>6900</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Accounting</DEPARTMENT_NAME>
    <FIRST_NAME>Shelley</FIRST_NAME>
    <JOB_ID>AC_MGR</JOB_ID>
    <SALARY>12000</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Accounting</DEPARTMENT_NAME>
    <FIRST_NAME>William</FIRST_NAME>
    <JOB_ID>AC_ACCOUNT</JOB_ID>
    <SALARY>8300</SALARY>
    </ROW>
    </ROWSET>

    Hi,
    This a good document to look at. Search for the words "Running Totals" and "Regrouping the XML Data" on the page.
    Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher
    http://docs.oracle.com/cd/E21043_01/bi.1111/e13881/T421739T481157.htm
    I hope it helps.
    Sinan

  • How to find the avg salary of first 3 employees based on each department?

    how to find the avg salary of first 3 employees based on each department?

    Hi,
    Do you mean something like this?
    with a as
    select
      deptno
      ,sal
      ,row_number() over ( partition by deptno order by sal desc) rn
    from
      emp
    select
      deptno
      ,round(avg(sal)) avg_sal_of_top_3
    from
      a
    where
      rn <= 3
    group by
      deptno
    order by
      deptno
    DEPTNO AVG_SAL_OF_TOP_3
        10             2917
        20             2992
        30             1983
    If not please give more details.
    Regards,
    Peter

  • Give SQL command to find the average annual salary per job in each department

    Give SQL command to find the average annual salary per job in each department pls help

    with
    data as
    (select empno,deptno,job,payday,1000 + trunc(500 * abs(dbms_random.normal)) + decode(deptno,10,500,11,200,12,100,0) salary
       from (select 1000 + trunc(dbms_random.value(10,100)) empno,
                    10 + floor(dbms_random.value(1,10) / 4) deptno,
                    decode(trunc(dbms_random.value(1,10)),1,'A',2,'B',3,'C',4,'D',5,'E',6,'F',7,'G',8,'H',9,'I','?') job
               from dual
             connect by level <= 17
            (select add_months(to_date(to_char(level),'mm'),-12) + 10 payday
               from dual
             connect by level <= 12
    select deptno,job,avg(salary) average_salary
      from data
    group by deptno,job
    order by deptno,job
    DEPTNO
    JOB
    AVERAGE_SALARY
    10
    B
    1812.83333333333333333333333333333333333
    10
    F
    2046.08333333333333333333333333333333333
    10
    G
    1877.45833333333333333333333333333333333
    10
    I
    2081.75
    11
    C
    1456.08333333333333333333333333333333333
    11
    E
    1654.91666666666666666666666666666666667
    11
    G
    1650.5
    11
    I
    1579.33333333333333333333333333333333333
    12
    A
    1580.58333333333333333333333333333333333
    12
    E
    1414.33333333333333333333333333333333333
    12
    H
    1380
    12
    I
    1404.83333333333333333333333333333333333
    Regards
    Etbin

  • SQL Select 1 record from each department

    assume emp table
    1- i want to retrive 1 employee from each department
    2- 2 from each
    3- total 20 records 1st employee from 1st dept, 2nd from 2nd, 3rd from 3rd, 4th from 1st , 5th from 2nd and so on
    Edited by: Fakhr-e-Alam on Aug 10, 2011 3:20 AM

    Is this homework? Remember to give OTN Forums full credit when you hand in your assignment.
    This is how to do the first one: you shoudl be able to figure out the others from here.
    SQL> select e.*
      2  from emp e
      3  where (empno, 1) in
      4      ( select x.empno
      5               , row_number() over (partition by x.deptno
      6                                    order by x.hiredate )
      7        from emp x )
      8  order by e.deptno
      9  /
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7782 BOEHMER    MANAGER         7839 09-JUN-81       2450                    10
          7369 CLARKE     CLERK           7902 17-DEC-80        800                    20
          7499 VAN WIJK   SALESMAN        7698 20-FEB-81       1600        300         30
          8101 PSMITH                          03-DEC-10                               40
          8060 VERREYNNE  PLUMBER         8061 08-APR-08       4000                    50
    SQL>In this case, the employees are ordered on the basis of HIREDATE, so the longest serving employees are selected from each department. Other definitions of "first" will require different sorting criteria. You know your own business rules.
    Cheers, APC
    Edited by: APC on Aug 10, 2011 10:33 AM

  • Query to retrieveonly three emplyee details from each department-v 10.2.0.4

    Hi all,
    Need query to retrieve only 3 employees from each department.
    Order can be same as server retrieve.
    Eg. If dept 10 has 5 employees, query should return only 3 employee details (emp#, deptno, salary).
    If dept 20 has only 1 employee then should return one emp details.
    Thanks.

    with t as (
               select  e.*,
                       row_number() over(partition by deptno order by 1) rn
                 from  emp e
    select  *
      from  t
      where rn <= 3
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO         RN
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10          1
          7839 KING       PRESIDENT            17-NOV-81       5000                    10          2
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10          3
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20          1
          7876 ADAMS      CLERK           7788 23-MAY-87        800                    20          2
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20          3
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1500        300         30          1
          7698 BLAKE      MANAGER         7839 01-MAY-81       1500                    30          2
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30          3
    9 rows selected.
    SQL> SY.

  • 3rd largest value in internal table

    How to find the third largest value in internal table.
    please give me logic without using sort statement?
    and how to find the 3rd largest value with using sort on internal table.
    please give the both logic separately?
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 21, 2008 5:28 PM

    First sort the internal table. and read the 3 record by index.
    if duplicate exists use delete adjacent duplicates and read the 3 record.
    second method.
    loop at itab into wa_itab.
    if sy-tabix = 1.
    lv_high = wa_itab-value.
    else.
         if lv_high > wa_itab-value.
         else.     
         lv_high = wa_itab-value.
         endif.
    endif.
    endloop.
    loop at itab into wa_itab < lv_high.
    if sy-tabix = 1.
    lv_sechigh = wa_itab-vlaue.
    else.
    if lv_shigh > wa_itab-value.
    else.
    lv_sechigh = wa_itab-value.
    endif.
    endif.
    endloop.
    loop at itab into wa_itab < lv_sechigh.
    if sy-tabix = 1.
    lv_thirdhigh = wa_itab-vlaue.
    else.
    if lv_thirdhigh > wa_itab-value.
    else.
    lv_thirdhigh = wa_itab-value.
    endif.
    endif.
    endloop.

  • To get the employee with the largest salary

    Is it possible to find the employee with the largest salary without using a subquery???

    Well, of course there are many tables with employees in them, but from the
    phrasing of the question (find highest salary, but can't use subquery!) I think we can
    conclude it's the emp table in question here :-)... and I have no sample schemas in any of my databases. And now? ;)
    I guess it's absolutely ok to ask for actual data. Moreover, it should be provided by OP when posting the question.
    I'm not here because I love to make (more or less) educated guesses.

  • Get each  department wise top 3 salarys

    hi..
    all
    how to get each deprtment wise top 3 salarys in sql

    Also, try this
    SQL> ed
    Wrote file afiedt.buf
      1  select deptno,salary FROM emp e WHERE 3 > (SELECT COUNT(*) FROM emp
      2                                             where salary > e.salary
      3                                             and deptno = e.deptno)
      4* ORDER BY 1,2 desc
    SQL> /
        DEPTNO     SALARY
            10      40020
            10      30020
            10      20020
            20     123456
            20      23456
            20      20000
    6 rows selected.
    SQL>

  • Oracle query for top two salary of each group departmentwise

    oracle query for top two salary departmentwise

    sigh...
    But anyway,
    Top-n queries:
    http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2853107469873
    and ofcourse lots of 'em here on OTN...

  • How to assign Creative Cloud subscriptions into groups for each department?

    What's the most effective way to manage CC-for-Teams subscriptions in groups?
    It would be great if we could manage subscriptions in folders.
    One folder per company department.
    But at the moment I seem to have to manage all our subscriptions under a the Primary admin of our VPP purchasing agreement.
    Is there a way to effectively separate departments on a CC-for-Teams plan? 
    Thanks in advance
    Matt

    Hi JBaumannMacMan,
    Please visit the below link for Creative cloud deployment.
    http://helpx.adobe.com/creative-cloud/packager.html
    Do let us know in case you would require further assistance.
    Regards,
    Ashish

  • We set up Airprint to our Xerox machine but we have codes set up so each department has to enter their code in before they print. Airprint will not work because we have the codes. Does any one know if there is a way to override this?

    Hello there-
    Our Xerox rep helped us set up Airprint to our copier machine. We have department codes set up on our copier so when any one goes to copy or print something they need to punch their code in. Airprint will not work because we have those codes (something prints out to the copier saying error due to accounting codes being set up). Does anyone know if there is a way to override this on our ipads? Thank you!!

    Hi Nico,
    if you want a local test/development setup of Oracle why don't you just install Oracle 11gR2 XE (http://www.oracle.com/technetwork/products/express-edition/downloads/index.html) ?
    If you install this you get a database, APEX (4.1), client etc all in one install, this includes a webserver (EPG) on port 8080 without having to configure anything. It's a simple next-next-next installation without much configuration.
    If you would like to seperate database and software you can always do this later when you understand the concepts of database/control files etc.
    If you would like to upgrade to APEX 4.2 you can download this afterwards and easily install this by running two scripts in SQL*Plus ( apexins.sql and apxldimg.sql ), just check the apex 4.2 installtion guid section EPG for this.
    Regards
    Bas
    b.t.w. If you're running windows 7 - 64 bits just use the 32 bits XE for windows, might get some warnings but you should be able to install and run, good enough for test/dev

  • How to get two top salaries from each department

    select st.staff_name,st.dept_code,
    st.staff_sal
    from staff_master st
    where staff_code in ((select  staff_code
    from staff_master s
    where staff_sal=(select max(staff_sal) from staff_master where dept_code=st.dept_code))
    union
    select staff_code from staff_master st where  staff_sal=
    (select max(staff_sal) from staff_master where dept_code=st.dept_code and staff_sal < (select max(staff_sal) from staff_master where dept_code=st.dept_code)))
    order by st.dept_code;

    You can use RANK, DENSE_RANK or even ROW_NUMBER based on your need. Below is an example using DENSE_RANK. I have used EMP table available in SCOTT schema.
    SQL> select * from emp order by deptno, sal desc;
         EMPNO ENAME  JOB              MGR HIREDATE         SAL        COM     DEPTNO         ID
          7782 CLARK  MANAGER         7839 09-JUN-13      12450          0         10
          7839 KING   PRESIDENT            17-NOV-13       5000          0         10
          7788 SCOTT  ANALYST         7566 19-APR-87      13000          0         20
          7369 SMITH  CLERK           7902 02-APR-13      12975          0         20
          7566 JONES  MANAGER         7839 02-APR-13      12975          0         20
          7876 ADAMS  CLERK           7788 23-MAY-87      11101          0         20
          7698 BLAKE  MANAGER         7839 01-MAY-13      12850          0         30
          7499 ALLEN  SALESMAN        7698 20-FEB-13      11600        300         30
          7844 TURNER SALESMAN        7698 08-SEP-13      11500          0         30
          7521 WARD   SALESMAN        7698 22-FEB-13      11250        500         30
          7654 MARTIN SALESMAN        7698 28-SEP-13      11250       1400         30
    11 rows selected.
    SQL> select *
      2    from (
      3           select e.*
      4                , dense_rank() over(partition by deptno order by sal desc) emp_rank
      5             from emp e
      6         )
      7   where emp_rank <= 2;
         EMPNO ENAME  JOB              MGR HIREDATE         SAL        COM     DEPTNO         ID   EMP_RANK
          7782 CLARK  MANAGER         7839 09-JUN-13      12450          0         10                     1
          7839 KING   PRESIDENT            17-NOV-13       5000          0         10                     2
          7788 SCOTT  ANALYST         7566 19-APR-87      13000          0         20                     1
          7369 SMITH  CLERK           7902 02-APR-13      12975          0         20                     2
          7566 JONES  MANAGER         7839 02-APR-13      12975          0         20                     2
          7698 BLAKE  MANAGER         7839 01-MAY-13      12850          0         30                     1
          7499 ALLEN  SALESMAN        7698 20-FEB-13      11600        300         30                     2
    7 rows selected.
    SQL>

  • Using two cursors, one for updating salary values in the emp table

    Using COPIES of the employee and department tables provided by Oracle or using similar taples that provide employee, salary, job and dept in one table and dept number and department name in another table, write the following program. Use the dept table to step through sequentially and bring up the records with the same department from the employee table. Using an IF statement calcuate a new salary based on the job (you decide on the criteria). Update each record on the employee file (this is why you should use copies) with the new salary. In addition, calculate the total salary for each department and create a new table with the department number, the department name and the salary.
    I'm able to update the salary values, but I'm not sure how to insert those updated values into an empty table the way this problem is asking me to.
    Here's my script so far: any help would be greatly appreciated: )
    declare
    v_deptno emp.deptno%type;
    v_job emp.job%type;
    v_sal emp.sal%type;
    v_dname dept.dname%type;
    v_deptsal totalsal.deptsal%type;
    cursor salup_c is
    select job,sal
    from emp,dept
    where emp.deptno = dept.deptno
    for update of sal;
    cursor totdeptsal_c is
    select dname,sal
    from emp,dept
    where emp.deptno = dept.deptno;
    Begin
    open salup_c;
    loop
    fetch salup_c into v_job,v_sal;
    exit when salup_c%notfound;
    if v_job = 'CLERK' then
    v_sal := v_sal + 10;
    else
    if v_job = 'ANALYST' then
    v_sal := v_sal + 20;
    else
    if v_job = 'MANAGER' then
    v_sal := v_sal + 30;
    else
    if v_job = 'PRESIDENT' then
    v_sal := v_sal + 40;
    else v_sal := v_sal + 50;
    end if;
    end if;
    end if;
    end if;
    update emp
    set sal = v_sal
    where current of salup_c;
    open totdeptsal_c;
    v_deptsal := 0;
    loop
    fetch totdeptsal_c into v_dname, v_deptsal;
    exit when totdeptsal_c%notfound;
    v_deptsal := v_deptsal + v_sal;
    insert into totalsal
    values(v_deptno,v_dname,v_deptsal);
    end loop;
    close totdeptsal_c;
    end loop;
    close salup_c;
    end;
    /

    The script is actually inserting some values into the new table but look at what I'm getting
    Here it is: i only want the dept number ,the dept name, and total salary for each department.
    SQL> @ sndprob;
    PL/SQL procedure successfully completed.
    SQL> select * from totalsal;
    DEPTNO DNAME DEPTSAL
    RESEARCH 1620
    SALES 2410
    SALES 2060
    RESEARCH 3785
    SALES 2060
    SALES 3660
    ACCOUNTING 3260
    RESEARCH 3810
    ACCOUNTING 5810
    SALES 2310
    RESEARCH 1910
    DEPTNO DNAME DEPTSAL
    SALES 1760
    RESEARCH 3810
    ACCOUNTING 2110
    RESEARCH 2460
    SALES 3300
    SALES 2900
    RESEARCH 4625
    SALES 2900
    SALES 4500
    ACCOUNTING 4100
    RESEARCH 4650
    DEPTNO DNAME DEPTSAL
    ACCOUNTING 6650
    SALES 3150
    RESEARCH 2750
    SALES 2600
    RESEARCH 4650
    ACCOUNTING 2950
    RESEARCH 2110
    SALES 2950
    SALES 2600
    RESEARCH 4275
    SALES 2550
    DEPTNO DNAME DEPTSAL
    SALES 4150
    ACCOUNTING 3750
    RESEARCH 4300
    ACCOUNTING 6300
    SALES 2800
    RESEARCH 2400
    SALES 2250
    RESEARCH 4300
    ACCOUNTING 2600
    RESEARCH 3815
    SALES 4655
    DEPTNO DNAME DEPTSAL
    SALES 4305
    RESEARCH 6010
    SALES 4255
    SALES 5855
    ACCOUNTING 5455
    RESEARCH 6005
    ACCOUNTING 8005
    SALES 4505
    RESEARCH 4105
    SALES 3955
    RESEARCH 6005
    DEPTNO DNAME DEPTSAL
    ACCOUNTING 4305
    RESEARCH 2110
    SALES 2950
    SALES 2600
    RESEARCH 4305
    SALES 2600
    SALES 4150
    ACCOUNTING 3750
    RESEARCH 4300
    ACCOUNTING 6300
    SALES 2800
    DEPTNO DNAME DEPTSAL
    RESEARCH 2400
    SALES 2250
    RESEARCH 4300
    ACCOUNTING 2600
    RESEARCH 3690
    SALES 4530
    SALES 4180
    RESEARCH 5885
    SALES 4180
    SALES 5760
    ACCOUNTING 5330
    DEPTNO DNAME DEPTSAL
    RESEARCH 5880
    ACCOUNTING 7880
    SALES 4380
    RESEARCH 3980
    SALES 3830
    RESEARCH 5880
    ACCOUNTING 4180
    RESEARCH 3290
    SALES 4130
    SALES 3780
    RESEARCH 5485
    DEPTNO DNAME DEPTSAL
    SALES 3780
    SALES 5360
    ACCOUNTING 4960
    RESEARCH 5480
    ACCOUNTING 7480
    SALES 3980
    RESEARCH 3580
    SALES 3430
    RESEARCH 5480
    ACCOUNTING 3780
    RESEARCH 3830
    DEPTNO DNAME DEPTSAL
    SALES 4670
    SALES 4320
    RESEARCH 6025
    SALES 4320
    SALES 5900
    ACCOUNTING 5500
    RESEARCH 6040
    ACCOUNTING 8020
    SALES 4520
    RESEARCH 4120
    SALES 3970
    DEPTNO DNAME DEPTSAL
    RESEARCH 6020
    ACCOUNTING 4320
    RESEARCH 5850
    SALES 6690
    SALES 6340
    RESEARCH 8045
    SALES 6340
    SALES 7920
    ACCOUNTING 7520
    RESEARCH 8060
    ACCOUNTING 10080
    DEPTNO DNAME DEPTSAL
    SALES 6540
    RESEARCH 6140
    SALES 5990
    RESEARCH 8040
    ACCOUNTING 6340
    RESEARCH 2360
    SALES 3200
    SALES 2850
    RESEARCH 4555
    SALES 2850
    SALES 4430
    DEPTNO DNAME DEPTSAL
    ACCOUNTING 4030
    RESEARCH 4570
    ACCOUNTING 6590
    SALES 3100
    RESEARCH 2650
    SALES 2500
    RESEARCH 4550
    ACCOUNTING 2850
    RESEARCH 1920
    SALES 2760
    SALES 2410
    DEPTNO DNAME DEPTSAL
    RESEARCH 4115
    SALES 2410
    SALES 3990
    ACCOUNTING 3590
    RESEARCH 4130
    ACCOUNTING 6150
    SALES 2660
    RESEARCH 2220
    SALES 2060
    RESEARCH 4110
    ACCOUNTING 2410
    DEPTNO DNAME DEPTSAL
    RESEARCH 1770
    SALES 2610
    SALES 2260
    RESEARCH 3965
    SALES 2260
    SALES 3840
    ACCOUNTING 3440
    RESEARCH 3980
    ACCOUNTING 6000
    SALES 2510
    RESEARCH 2070
    DEPTNO DNAME DEPTSAL
    SALES 1920
    RESEARCH 3960
    ACCOUNTING 2260
    RESEARCH 3830
    SALES 4670
    SALES 4320
    RESEARCH 6025
    SALES 4320
    SALES 5900
    ACCOUNTING 5500
    RESEARCH 6040
    DEPTNO DNAME DEPTSAL
    ACCOUNTING 8060
    SALES 4570
    RESEARCH 4130
    SALES 3980
    RESEARCH 6040
    ACCOUNTING 4320
    RESEARCH 2120
    SALES 2960
    SALES 2610
    RESEARCH 4315
    SALES 2610
    DEPTNO DNAME DEPTSAL
    SALES 4190
    ACCOUNTING 3790
    RESEARCH 4330
    ACCOUNTING 6350
    SALES 2860
    RESEARCH 2420
    SALES 2270
    RESEARCH 4330
    ACCOUNTING 2620
    196 rows selected.

Maybe you are looking for