title: How to remove redundancies using db2?
body: <p>Is there some function to remove the redundancies from this table?</p>
  
  <p>This is the query</p>
  
  <pre><code>db2 =&gt; SELECT qwe.workdept, qwe.lastname, weq.projname, ewq.actno FROM employee qwe, project weq INNER JOIN empprojact ewq ON weq.projno=ewq.projno WHERE workdept='A00'ORDER BY 2,3
  </code></pre>
  
  <p>This is the result.</p>
  
  <pre><code> WORKDEPT LASTNAME        PROJNAME                 ACTNO
   -------- --------------- ------------------------ ------
  A00      HAAS            ACCOUNT PROGRAMMING          70
  A00      HAAS            ACCOUNT PROGRAMMING          80
  A00      HAAS            ACCOUNT PROGRAMMING          80
  A00      HAAS            ACCOUNT PROGRAMMING          70
  A00      HAAS            ACCOUNT PROGRAMMING          70
  A00      HAAS            ACCOUNT PROGRAMMING          60
  A00      HAAS            ACCOUNT PROGRAMMING          60
  A00      HAAS            ACCOUNT PROGRAMMING          60
  A00      HAAS            ACCOUNT PROGRAMMING         180
  A00      HAAS            ACCOUNT PROGRAMMING         180
  A00      HAAS            ACCOUNT PROGRAMMING         180
  A00      HAAS            ACCOUNT PROGRAMMING          80
  A00      HAAS            ACCOUNT PROGRAMMING          80
  A00      HAAS            ACCOUNT PROGRAMMING          70
  A00      HAAS            ADMIN SERVICES               10
  A00      HAAS            APPLICATIONS SUPPORT        140
  A00      HAAS            APPLICATIONS SUPPORT        160
  A00      HAAS            DB/DC SUPPORT               140
  A00      HAAS            DB/DC SUPPORT               170
  A00      HAAS            GENERAL ADMIN SYSTEMS        10
  A00      HAAS            OPERATION                    10
  A00      HAAS            OPERATION                   130
  A00      HAAS            OPERATION                   130
  A00      HAAS            OPERATION                   130
  A00      HAAS            OPERATION                   130
  A00      HAAS            OPERATION SUPPORT            10
  A00      HAAS            PAYROLL PROGRAMMING          60
  A00      HAAS            PAYROLL PROGRAMMING          80
  A00      HAAS            PAYROLL PROGRAMMING          70
  A00      HAAS            PAYROLL PROGRAMMING         180
  A00      HAAS            PAYROLL PROGRAMMING          80
  A00      HAAS            PAYROLL PROGRAMMING          70
  A00      HAAS            PAYROLL PROGRAMMING          60
  A00      HAAS            PERSONNEL PROGRAMMING        60
  A00      HAAS            PERSONNEL PROGRAMMING       180
  A00      HAAS            PERSONNEL PROGRAMMING        80
  A00      HAAS            PERSONNEL PROGRAMMING        80
  A00      HAAS            PERSONNEL PROGRAMMING        70
  A00      HAAS            PERSONNEL PROGRAMMING        70
  A00      HAAS            PERSONNEL PROGRAMMING        70
  A00      HAAS            PERSONNEL PROGRAMMING        60
  A00      HAAS            PERSONNEL PROGRAMMING        60
  A00      HAAS            QUERY SERVICES               10
  A00      HAAS            QUERY SERVICES               90
  A00      HAAS            QUERY SERVICES              100
  A00      HAAS            QUERY SERVICES               90
  A00      HAAS            SCP SYSTEMS SUPPORT         140
  A00      HAAS            SCP SYSTEMS SUPPORT         150
  A00      HAAS            SYSTEMS SUPPORT              10
  A00      HAAS            SYSTEMS SUPPORT              10
  A00      HAAS            USER EDUCATION               10
  A00      HAAS            USER EDUCATION              110
  A00      HAAS            USER EDUCATION              110
  A00      HAAS            USER EDUCATION              100
  A00      HAAS            USER EDUCATION              100
  A00      HAAS            W L PROD CONT PROGS          60
  A00      HAAS            W L PROD CONT PROGS         180
  A00      HAAS            W L PROD CONT PROGS          80
  A00      HAAS            W L PROD CONT PROGS          70
  A00      HAAS            W L PROD CONT PROGS          80
  A00      HAAS            W L PROGRAM DESIGN           50
  A00      HAAS            W L PROGRAM DESIGN           40
  A00      HAAS            W L PROGRAM DESIGN           60
  A00      HAAS            W L PROGRAMMING              10
  A00      HAAS            W L ROBOT DESIGN             60
  A00      HAAS            W L ROBOT DESIGN             80
  A00      HAAS            W L ROBOT DESIGN             70
  A00      HAAS            W L ROBOT DESIGN             70
  A00      HAAS            W L ROBOT DESIGN             60
  A00      HAAS            W L ROBOT DESIGN            180
  A00      HAAS            WELD LINE AUTOMATION         10
  A00      HAAS            WELD LINE AUTOMATION         20
  A00      HAAS            WELD LINE PLANNING           30
  A00      HEMMINGER       ACCOUNT PROGRAMMING          70
  A00      HEMMINGER       ACCOUNT PROGRAMMING          80
  A00      HEMMINGER       ACCOUNT PROGRAMMING          80
  A00      HEMMINGER       ACCOUNT PROGRAMMING          70
  A00      HEMMINGER       ACCOUNT PROGRAMMING          70
  A00      HEMMINGER       ACCOUNT PROGRAMMING          60
  A00      HEMMINGER       ACCOUNT PROGRAMMING          60
  A00      HEMMINGER       ACCOUNT PROGRAMMING          60
  A00      HEMMINGER       ACCOUNT PROGRAMMING         180
  A00      HEMMINGER       ACCOUNT PROGRAMMING         180
  A00      HEMMINGER       ACCOUNT PROGRAMMING         180
  A00      HEMMINGER       ACCOUNT PROGRAMMING          80
  A00      HEMMINGER       ACCOUNT PROGRAMMING          80
  A00      HEMMINGER       ACCOUNT PROGRAMMING          70
  A00      HEMMINGER       ADMIN SERVICES               10
  A00      HEMMINGER       APPLICATIONS SUPPORT        140
  A00      HEMMINGER       APPLICATIONS SUPPORT        160
  A00      HEMMINGER       DB/DC SUPPORT               140
  A00      HEMMINGER       DB/DC SUPPORT               170
  A00      HEMMINGER       GENERAL ADMIN SYSTEMS        10
  A00      HEMMINGER       OPERATION                    10
  A00      HEMMINGER       OPERATION                   130
  A00      HEMMINGER       OPERATION                   130
  A00      HEMMINGER       OPERATION                   130
  A00      HEMMINGER       OPERATION                   130
  A00      HEMMINGER       OPERATION SUPPORT            10
  A00      HEMMINGER       PAYROLL PROGRAMMING          60
  A00      HEMMINGER       PAYROLL PROGRAMMING          80
  A00      HEMMINGER       PAYROLL PROGRAMMING          70
  A00      HEMMINGER       PAYROLL PROGRAMMING         180
  A00      HEMMINGER       PAYROLL PROGRAMMING          80
  A00      HEMMINGER       PAYROLL PROGRAMMING          70
  A00      HEMMINGER       PAYROLL PROGRAMMING          60
  A00      HEMMINGER       PERSONNEL PROGRAMMING        60
  A00      HEMMINGER       PERSONNEL PROGRAMMING       180
  A00      HEMMINGER       PERSONNEL PROGRAMMING        80
  A00      HEMMINGER       PERSONNEL PROGRAMMING        80
  A00      HEMMINGER       PERSONNEL PROGRAMMING        70
  A00      HEMMINGER       PERSONNEL PROGRAMMING        70
  A00      HEMMINGER       PERSONNEL PROGRAMMING        70
  A00      HEMMINGER       PERSONNEL PROGRAMMING        60
  A00      HEMMINGER       PERSONNEL PROGRAMMING        60
  A00      HEMMINGER       QUERY SERVICES               10
  A00      HEMMINGER       QUERY SERVICES               90
  A00      HEMMINGER       QUERY SERVICES              100
  A00      HEMMINGER       QUERY SERVICES               90
  A00      HEMMINGER       SCP SYSTEMS SUPPORT         140
  A00      HEMMINGER       SCP SYSTEMS SUPPORT         150
  A00      HEMMINGER       SYSTEMS SUPPORT              10
  A00      HEMMINGER       SYSTEMS SUPPORT              10
  A00      HEMMINGER       USER EDUCATION               10
  A00      HEMMINGER       USER EDUCATION              110
  A00      HEMMINGER       USER EDUCATION              110
  A00      HEMMINGER       USER EDUCATION              100
  A00      HEMMINGER       USER EDUCATION              100
  A00      HEMMINGER       W L PROD CONT PROGS          60
  A00      HEMMINGER       W L PROD CONT PROGS         180
  A00      HEMMINGER       W L PROD CONT PROGS          80
  A00      HEMMINGER       W L PROD CONT PROGS          70
  A00      HEMMINGER       W L PROD CONT PROGS          80
  A00      HEMMINGER       W L PROGRAM DESIGN           50
  A00      HEMMINGER       W L PROGRAM DESIGN           40
  A00      HEMMINGER       W L PROGRAM DESIGN           60
  A00      HEMMINGER       W L PROGRAMMING              10
  A00      HEMMINGER       W L ROBOT DESIGN             60
  A00      HEMMINGER       W L ROBOT DESIGN             80
  A00      HEMMINGER       W L ROBOT DESIGN             70
  A00      HEMMINGER       W L ROBOT DESIGN             70
  A00      HEMMINGER       W L ROBOT DESIGN             60
  A00      HEMMINGER       W L ROBOT DESIGN            180
  A00      HEMMINGER       WELD LINE AUTOMATION         10
  A00      HEMMINGER       WELD LINE AUTOMATION         20
  A00      HEMMINGER       WELD LINE PLANNING           30
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          70
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          80
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          80
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          70
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          70
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          60
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          60
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          60
  A00      LUCCHESSI       ACCOUNT PROGRAMMING         180
  A00      LUCCHESSI       ACCOUNT PROGRAMMING         180
  A00      LUCCHESSI       ACCOUNT PROGRAMMING         180
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          80
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          80
  A00      LUCCHESSI       ACCOUNT PROGRAMMING          70
  A00      LUCCHESSI       ADMIN SERVICES               10
  A00      LUCCHESSI       APPLICATIONS SUPPORT        140
  A00      LUCCHESSI       APPLICATIONS SUPPORT        160
  A00      LUCCHESSI       DB/DC SUPPORT               140
  A00      LUCCHESSI       DB/DC SUPPORT               170
  A00      LUCCHESSI       GENERAL ADMIN SYSTEMS        10
  A00      LUCCHESSI       OPERATION                    10
  A00      LUCCHESSI       OPERATION                   130
  A00      LUCCHESSI       OPERATION                   130
  A00      LUCCHESSI       OPERATION                   130
  A00      LUCCHESSI       OPERATION                   130
  A00      LUCCHESSI       OPERATION SUPPORT            10
  A00      LUCCHESSI       PAYROLL PROGRAMMING          60
  A00      LUCCHESSI       PAYROLL PROGRAMMING          80
  A00      LUCCHESSI       PAYROLL PROGRAMMING          70
  A00      LUCCHESSI       PAYROLL PROGRAMMING         180
  A00      LUCCHESSI       PAYROLL PROGRAMMING          80
  A00      LUCCHESSI       PAYROLL PROGRAMMING          70
  A00      LUCCHESSI       PAYROLL PROGRAMMING          60
  A00      LUCCHESSI       PERSONNEL PROGRAMMING        60
  A00      LUCCHESSI       PERSONNEL PROGRAMMING       180
  A00      LUCCHESSI       PERSONNEL PROGRAMMING        80
  A00      LUCCHESSI       PERSONNEL PROGRAMMING        80
  A00      LUCCHESSI       PERSONNEL PROGRAMMING        70
  A00      LUCCHESSI       PERSONNEL PROGRAMMING        70
  A00      LUCCHESSI       PERSONNEL PROGRAMMING        70
  A00      LUCCHESSI       PERSONNEL PROGRAMMING        60
  A00      LUCCHESSI       PERSONNEL PROGRAMMING        60
  A00      LUCCHESSI       QUERY SERVICES               10
  A00      LUCCHESSI       QUERY SERVICES               90
  A00      LUCCHESSI       QUERY SERVICES              100
  A00      LUCCHESSI       QUERY SERVICES               90
  A00      LUCCHESSI       SCP SYSTEMS SUPPORT         140
  A00      LUCCHESSI       SCP SYSTEMS SUPPORT         150
  A00      LUCCHESSI       SYSTEMS SUPPORT              10
  A00      LUCCHESSI       SYSTEMS SUPPORT              10
  A00      LUCCHESSI       USER EDUCATION               10
  A00      LUCCHESSI       USER EDUCATION              110
  A00      LUCCHESSI       USER EDUCATION              110
  A00      LUCCHESSI       USER EDUCATION              100
  A00      LUCCHESSI       USER EDUCATION              100
  A00      LUCCHESSI       W L PROD CONT PROGS          60
  A00      LUCCHESSI       W L PROD CONT PROGS         180
  A00      LUCCHESSI       W L PROD CONT PROGS          80
  A00      LUCCHESSI       W L PROD CONT PROGS          70
  A00      LUCCHESSI       W L PROD CONT PROGS          80
  A00      LUCCHESSI       W L PROGRAM DESIGN           50
  A00      LUCCHESSI       W L PROGRAM DESIGN           40
  A00      LUCCHESSI       W L PROGRAM DESIGN           60
  A00      LUCCHESSI       W L PROGRAMMING              10
  A00      LUCCHESSI       W L ROBOT DESIGN             60
  A00      LUCCHESSI       W L ROBOT DESIGN             80
  A00      LUCCHESSI       W L ROBOT DESIGN             70
  A00      LUCCHESSI       W L ROBOT DESIGN             70
  A00      LUCCHESSI       W L ROBOT DESIGN             60
  A00      LUCCHESSI       W L ROBOT DESIGN            180
  A00      LUCCHESSI       WELD LINE AUTOMATION         10
  A00      LUCCHESSI       WELD LINE AUTOMATION         20
  A00      LUCCHESSI       WELD LINE PLANNING           30
  A00      O'CONNELL       ACCOUNT PROGRAMMING          70
  A00      O'CONNELL       ACCOUNT PROGRAMMING          80
  A00      O'CONNELL       ACCOUNT PROGRAMMING          80
  A00      O'CONNELL       ACCOUNT PROGRAMMING          70
  A00      O'CONNELL       ACCOUNT PROGRAMMING          70
  A00      O'CONNELL       ACCOUNT PROGRAMMING          60
  A00      O'CONNELL       ACCOUNT PROGRAMMING          60
  A00      O'CONNELL       ACCOUNT PROGRAMMING          60
  A00      O'CONNELL       ACCOUNT PROGRAMMING         180
  A00      O'CONNELL       ACCOUNT PROGRAMMING         180
  A00      O'CONNELL       ACCOUNT PROGRAMMING         180
  A00      O'CONNELL       ACCOUNT PROGRAMMING          80
  A00      O'CONNELL       ACCOUNT PROGRAMMING          80
  A00      O'CONNELL       ACCOUNT PROGRAMMING          70
  A00      O'CONNELL       ADMIN SERVICES               10
  A00      O'CONNELL       APPLICATIONS SUPPORT        140
  A00      O'CONNELL       APPLICATIONS SUPPORT        160
  A00      O'CONNELL       DB/DC SUPPORT               140
  A00      O'CONNELL       DB/DC SUPPORT               170
  A00      O'CONNELL       GENERAL ADMIN SYSTEMS        10
  A00      O'CONNELL       OPERATION                    10
  A00      O'CONNELL       OPERATION                   130
  A00      O'CONNELL       OPERATION                   130
  A00      O'CONNELL       OPERATION                   130
  A00      O'CONNELL       OPERATION                   130
  A00      O'CONNELL       OPERATION SUPPORT            10
  A00      O'CONNELL       PAYROLL PROGRAMMING          60
  A00      O'CONNELL       PAYROLL PROGRAMMING          80
  A00      O'CONNELL       PAYROLL PROGRAMMING          70
  A00      O'CONNELL       PAYROLL PROGRAMMING         180
  A00      O'CONNELL       PAYROLL PROGRAMMING          80
  A00      O'CONNELL       PAYROLL PROGRAMMING          70
  A00      O'CONNELL       PAYROLL PROGRAMMING          60
  A00      O'CONNELL       PERSONNEL PROGRAMMING        60
  A00      O'CONNELL       PERSONNEL PROGRAMMING       180
  A00      O'CONNELL       PERSONNEL PROGRAMMING        80
  A00      O'CONNELL       PERSONNEL PROGRAMMING        80
  A00      O'CONNELL       PERSONNEL PROGRAMMING        70
  A00      O'CONNELL       PERSONNEL PROGRAMMING        70
  A00      O'CONNELL       PERSONNEL PROGRAMMING        70
  A00      O'CONNELL       PERSONNEL PROGRAMMING        60
  A00      O'CONNELL       PERSONNEL PROGRAMMING        60
  A00      O'CONNELL       QUERY SERVICES               10
  A00      O'CONNELL       QUERY SERVICES               90
  A00      O'CONNELL       QUERY SERVICES              100
  A00      O'CONNELL       QUERY SERVICES               90
  A00      O'CONNELL       SCP SYSTEMS SUPPORT         140
  A00      O'CONNELL       SCP SYSTEMS SUPPORT         150
  A00      O'CONNELL       SYSTEMS SUPPORT              10
  A00      O'CONNELL       SYSTEMS SUPPORT              10
  A00      O'CONNELL       USER EDUCATION               10
  A00      O'CONNELL       USER EDUCATION              110
  A00      O'CONNELL       USER EDUCATION              110
  A00      O'CONNELL       USER EDUCATION              100
  A00      O'CONNELL       USER EDUCATION              100
  A00      O'CONNELL       W L PROD CONT PROGS          60
  A00      O'CONNELL       W L PROD CONT PROGS         180
  A00      O'CONNELL       W L PROD CONT PROGS          80
  A00      O'CONNELL       W L PROD CONT PROGS          70
  A00      O'CONNELL       W L PROD CONT PROGS          80
  A00      O'CONNELL       W L PROGRAM DESIGN           50
  A00      O'CONNELL       W L PROGRAM DESIGN           40
  A00      O'CONNELL       W L PROGRAM DESIGN           60
  A00      O'CONNELL       W L PROGRAMMING              10
  A00      O'CONNELL       W L ROBOT DESIGN             60
  A00      O'CONNELL       W L ROBOT DESIGN             80
  A00      O'CONNELL       W L ROBOT DESIGN             70
  A00      O'CONNELL       W L ROBOT DESIGN             70
  A00      O'CONNELL       W L ROBOT DESIGN             60
  A00      O'CONNELL       W L ROBOT DESIGN            180
  A00      O'CONNELL       WELD LINE AUTOMATION         10
  A00      O'CONNELL       WELD LINE AUTOMATION         20
  A00      O'CONNELL       WELD LINE PLANNING           30
  A00      ORLANDO         ACCOUNT PROGRAMMING          70
  A00      ORLANDO         ACCOUNT PROGRAMMING          80
  A00      ORLANDO         ACCOUNT PROGRAMMING          80
  A00      ORLANDO         ACCOUNT PROGRAMMING          70
  A00      ORLANDO         ACCOUNT PROGRAMMING          70
  A00      ORLANDO         ACCOUNT PROGRAMMING          60
  A00      ORLANDO         ACCOUNT PROGRAMMING          60
  A00      ORLANDO         ACCOUNT PROGRAMMING          60
  A00      ORLANDO         ACCOUNT PROGRAMMING         180
  A00      ORLANDO         ACCOUNT PROGRAMMING         180
  A00      ORLANDO         ACCOUNT PROGRAMMING         180
  A00      ORLANDO         ACCOUNT PROGRAMMING          80
  A00      ORLANDO         ACCOUNT PROGRAMMING          80
  A00      ORLANDO         ACCOUNT PROGRAMMING          70
  A00      ORLANDO         ADMIN SERVICES               10
  A00      ORLANDO         APPLICATIONS SUPPORT        140
  A00      ORLANDO         APPLICATIONS SUPPORT        160
  A00      ORLANDO         DB/DC SUPPORT               140
  A00      ORLANDO         DB/DC SUPPORT               170
  A00      ORLANDO         GENERAL ADMIN SYSTEMS        10
  A00      ORLANDO         OPERATION                    10
  A00      ORLANDO         OPERATION                   130
  A00      ORLANDO         OPERATION                   130
  A00      ORLANDO         OPERATION                   130
  A00      ORLANDO         OPERATION                   130
  A00      ORLANDO         OPERATION SUPPORT            10
  A00      ORLANDO         PAYROLL PROGRAMMING          60
  A00      ORLANDO         PAYROLL PROGRAMMING          80
  A00      ORLANDO         PAYROLL PROGRAMMING          70
  A00      ORLANDO         PAYROLL PROGRAMMING         180
  A00      ORLANDO         PAYROLL PROGRAMMING          80
  A00      ORLANDO         PAYROLL PROGRAMMING          70
  A00      ORLANDO         PAYROLL PROGRAMMING          60
  A00      ORLANDO         PERSONNEL PROGRAMMING        60
  A00      ORLANDO         PERSONNEL PROGRAMMING       180
  A00      ORLANDO         PERSONNEL PROGRAMMING        80
  A00      ORLANDO         PERSONNEL PROGRAMMING        80
  A00      ORLANDO         PERSONNEL PROGRAMMING        70
  A00      ORLANDO         PERSONNEL PROGRAMMING        70
  A00      ORLANDO         PERSONNEL PROGRAMMING        70
  A00      ORLANDO         PERSONNEL PROGRAMMING        60
  A00      ORLANDO         PERSONNEL PROGRAMMING        60
  A00      ORLANDO         QUERY SERVICES               10
  A00      ORLANDO         QUERY SERVICES               90
  A00      ORLANDO         QUERY SERVICES              100
  A00      ORLANDO         QUERY SERVICES               90
  A00      ORLANDO         SCP SYSTEMS SUPPORT         140
  A00      ORLANDO         SCP SYSTEMS SUPPORT         150
  A00      ORLANDO         SYSTEMS SUPPORT              10
  A00      ORLANDO         SYSTEMS SUPPORT              10
  A00      ORLANDO         USER EDUCATION               10
  A00      ORLANDO         USER EDUCATION              110
  A00      ORLANDO         USER EDUCATION              110
  A00      ORLANDO         USER EDUCATION              100
  A00      ORLANDO         USER EDUCATION              100
  A00      ORLANDO         W L PROD CONT PROGS          60
  A00      ORLANDO         W L PROD CONT PROGS         180
  A00      ORLANDO         W L PROD CONT PROGS          80
  A00      ORLANDO         W L PROD CONT PROGS          70
  A00      ORLANDO         W L PROD CONT PROGS          80
  A00      ORLANDO         W L PROGRAM DESIGN           50
  A00      ORLANDO         W L PROGRAM DESIGN           40
  A00      ORLANDO         W L PROGRAM DESIGN           60
  A00      ORLANDO         W L PROGRAMMING              10
  A00      ORLANDO         W L ROBOT DESIGN             60
  A00      ORLANDO         W L ROBOT DESIGN             80
  A00      ORLANDO         W L ROBOT DESIGN             70
  A00      ORLANDO         W L ROBOT DESIGN             70
  A00      ORLANDO         W L ROBOT DESIGN             60
  A00      ORLANDO         W L ROBOT DESIGN            180
  A00      ORLANDO         WELD LINE AUTOMATION         10
  A00      ORLANDO         WELD LINE AUTOMATION         20
  A00      ORLANDO         WELD LINE PLANNING           30
  
  365 record(s) selected.
  </code></pre>
  
  <p>Is it possible to remove the repeating information from col 3?
  BTW, I'm using db2 and Sample database.</p>
  
  <p>PS: 3rd time posting here and currently new in using db2.</p>