How to remove duplicates from a Table using PL/SQL

I created the following tables with data:

* Table 1: *.



Department of CREATE TABLE

(DEPARTMENT_ID 4 NUMBER PRIMARY KEY,

DEPARTMENT_NAME VARCHAR2 (20).

ADDRESS VARCHAR2 (20));







INSERT INTO Department VALUES (10, 'ACCOUNTING', 'NEW YORK');

INSERT INTO Department VALUES (20, "SEARCH", "DALLAS");

INSERT INTO Department VALUES (30, 'SALES', 'CHICAGO');

INSERT INTO Department VALUES (40, 'OPERATIONS', 'BOSTON');

COMMIT;



* 2nd table: *.

CREATE TABLE employee

(EMPLOYEE_ID NUMBER 4 PRIMARY KEY,

EMPLOYEE_NAME VARCHAR2 (20).

USE VARCHAR2 (20).

MANAGER_ID NUMBER 4,

HIRE_DATE DATE,

NUMBER OF SALARY (9, 2)

COMMISSION (9, 2) NUMBER,

Department_id number 4 REFERENCES department (DEPARTMENT_ID));






INSERT INTO employee

VALUES (7839, 'KING', 'PRESIDENT', NULL, NOVEMBER 17, 81 ', 5000, NULL, 10);

INSERT INTO employee

VALUES (7698, "BLAKE", "MANAGER", 7839, MAY 1, 81 ', 2850, NULL, 30);

INSERT INTO employee

VALUES (7782, "CLARK", "MANAGER", 7839, JUNE 9, 81 ', 2450, NULL, 10);

INSERT INTO employee

VALUES (7566, "JONES", "MANAGER", 7839, APRIL 2, 81 ', 2975, NULL, 20);

INSERT INTO employee

VALUES (7654, 'MARTIN', 'SELLER', 7698, 28-SEP-81', 1250, 1400, 30);

INSERT INTO employee

VALUES (7499, 'ALLEN', 'SELLER', 7698, FEBRUARY 20, 81 ', 1600, 300, 30);

INSERT INTO employee

VALUES (7844, 'TURNER', 'SELLER', 7698, ' 08-SEP-81', 1500, NULL, 30);

INSERT INTO employee

VALUES (7900, 'JAMES', 'CLERKS', 7698, 3 DECEMBER 81', 950, NULL, 30);

INSERT INTO employee

VALUES (7521, 'WARD', 'SELLER', 7698, FEBRUARY 22, 81 ', 1 250, 500, 30);

INSERT INTO employee

VALUES (7902, "FORD", "ANALYST", 7566, DECEMBER 3, 81 ', 3000, NULL, 20);

INSERT INTO employee

VALUES (7369, 'SMITH', 'CLERKS', 7902, DECEMBER 17, 81 ', 800, NULL, 20);

INSERT INTO employee

VALUES (7788, 'SCOTT', 'ANALYST', 7566, DECEMBER 9, 82 ', 3000, NULL, 20);

INSERT INTO employee

VALUES (7876, ' ADAMS, "CLERK", 7788, 12 JANUARY, 83', 1100, NULL, 20);

INSERT INTO employee

VALUES (7934, 'MILLER', 'CLERKS', 7782, JANUARY 22, 82 ', 1300, NULL, 10);

COMMIT;



I need to print all Department names, employee and salary. I did this, but how can display the name of each Department only once?





Here is my code:



DECLARE

v_department_name department.department_name%TYPE;

v_employee_name employee.employee_name%TYPE;

v_salary employee.salary%TYPE;

CURSOR dept_cur

IS

SELECT employee_name, department_name, Department OF employee salary

WHERE department.department_id = employee.department_id (+)

ORDER BY department_name, employee_name;

BEGIN

OPEN dept_cur.

EXTRACT the dept_cur IN v_department_name, v_employee_name, v_salary;

DBMS_OUTPUT. PUT_LINE ('DEPARTMENT_NAME EMPLOYEE_NAME WAGES');

DBMS_OUTPUT. PUT_LINE('---------------------------------------------------');

While dept_cur % FOUND

LOOP

DBMS_OUTPUT. Put_line (RPAD (v_department_name, 10) |) ' ' || RPAD (v_employee_name, 10). ' ' || v_salary);

EXTRACT the dept_cur IN v_department_name, v_employee_name, v_salary;

END LOOP;

CLOSE Dept_cur;

END;

I would appreciate if you could help me with this. I'm sure it's a quick and easy answer, but I can't do it. I spent so much time already.

Published by: 831522 on January 26, 2011 11:44

It is a problem of display/reports rather than a problem of duplication of query data. The answer depends on what tools you use to query and display the data. You can use the clause "break it" I suggested earlier if you use SQL Plus.

Otherwise, you can try this based on the version of Oracle you are using. Someone else may be able to get the data in a single pass.

SELECT decode(emp_id, 1, department_name) department_name, employee_name, salary
FROM(SELECT department_name, employee_name, salary,
       ROW_NUMBER() OVER (PARTITION BY department_name order by department_name, employee_name) AS emp_id
     FROM department
     LEFT OUTER JOIN employee ON (department.department_id = employee.department_id)
ORDER BY department_name, employee_name, emp_id);

Tags: Database

Similar Questions

  • JS: How to remove duplicates in a table?

    JS: How to remove duplicates in a table?

    I guess there's a simple solution...

    Hey!

    Maybe something like this:

    Array.prototype.unique = function (){
        var r = new Array();
        o:for(var i = 0, n = this.length; i < n; i++){
            for(var x = 0, y = r.length; x < y; x++){
                if(r[x]==this[i]) continue o;}
            r[r.length] = this[i];}
        return r;
    }
    

    Use:

    var myArray = ["a","b","c","c","a","d","b","b"];
    alert(myArray.unique());
    

    Hope that helps.

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • How to remove duplicates from comma separated string


    Hi all

    I have an obligation to remove duplicates of string separated by commas:

    Some examples of code (real data can be in millions)

    {code}

    create table test_dup_del (num number (10), dup_val varchar2 (100));

    insert into test_dup_del values (1234, '1, 2, 3, 4, 3, 1');
    insert into test_dup_del values (4567,'1, 2, 2, 4, 4, 1');
    insert into test_dup_del values (7894,'1, 2, 1, 3, 3, 1');
    insert into test_dup_del values (1478, '1, 2, 4, 4, 3, 2');
    insert into test_dup_del values (2589, '1, 2, 1, 2, 1, 2');
    commit;

    (code}

    my output would be:

    1234, 1, 2, 3, 4'

    4567, '1, 2, 4'

    7894, '1, 2, 3'

    1478, 1, 2, 3, 4'

    2589, 1, 2'

    Thank you

    Rachid

    If there is a real need to split the data so that it could be corrected (before split to store correctly... Tip tip!) ...

    SQL > ed
    A written file afiedt.buf

    1 with test_dup_del (num, dup_val) as)
    2 Select 1234, 1, 2, 3, 4, 3, 1' Union double all the
    3 select 4567, 1, 2, 2, 4, 4, 1' Union double all the
    4 Select 7894, 1, 2, 1, 3, 3, 1' Union double all the
    5 Select 1478, 1, 2, 4, 4, 3, 2' of all the double union
    6 select 2589, 1, 2, 1, 2, 1, 2' of the double
    7      )
    8  --
    9. end of test data
    10-
    11, split as)
    12. Select num
    13, trim (regexp_substr(dup_val,'[^,]+',1,level)) as val
    14 from test_dup_del
    15 connect by num = num prior
    16 and level<=>
    17 and prior sys_guid() is not null
    18                )
    19, dist in (select distinct)
    20                      num
    21                      ,val
    22 split
    23              )
    24 select num
    25, listagg (val, ',') within the Group (order by val) as vals
    dist 26
    27 * group by num
    SQL > /.
    NUM OF VALS
    ---------- ------------------------------
    1234 1,2,3,4
    1478 1,2,3,4
    2589 1.2
    4567 1,2,4
    7894 1,2,3

    5 selected lines.

  • How to remove duplicates from the PL - SQL table?

    Hi gurus,

    I have a PL - SQL table with the following structure
    Authors (SR_NO, Auth_Code, Change_Date, cost)

    This table is filled using a slider. However, this table can have a few lines in double (for column (Auth_Code)
    for example
    SR_NO      Auth_Code       Change_Date                       Cost
    1               A1             14-FEB-09 08.18.47 AM          11.00
    2               A2             14-FEB-09 08.18.56 AM       2839.00
    3               A1             15-FEB-09 08.00.02 AM      1299.00
    4               A1             15-FEB-09 07.00.00 AM        789.00
    5               A3             14-FEB-09 08.18.56 AM        312.00
    6               A4             14-FEB-09 08.19.02 AM        233.00
    I need to get the above result set select the separate lines of Auth_Code including the Change_Date is maximum (and store in another PL - SQL table for treatment later or even the removal of this table will be also!)

    of the data A1 is duplicated and a maximum Change_Date above = 15 February 09 08.00.02 AM.
    Where my PL - SQL Table that results must have given below
    SR_NO      Auth_Code       Change_Date                       Cost
    2               A2             14-FEB-09 08.18.56 AM       2839.00
    3               A1             15-FEB-09 08.00.02 AM      1299.00
    5               A3             14-FEB-09 08.18.56 AM        312.00
    6               A4             14-FEB-09 08.19.02 AM        233.00
    I'm not very aware of the PL - SQL tables and there is no chance to change the existing cursor that fills the data in this table PL - SQL.
    I guess that I need to compare each record of PL - SQL table with others, but do not know how to do this.

    Could you please help?

    Hello

    Like this?:

    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    
    SQL>
    SQL> with data as(
      2  select 1 as SR_NO, 'A1' as Auth_Code, to_date('14-FEB-09 08.18.47', 'dd-mon-yy hh24:mi:ss') as change_date,    11.00 as cost from dual union all
      3  select 2 as SR_NO, 'A2' as Auth_Code, to_date('14-FEB-09 08.18.56', 'dd-mon-yy hh24:mi:ss') as change_date,  2839.00 as cost from dual union all
      4  select 3 as SR_NO, 'A1' as Auth_Code, to_date('15-FEB-09 08.00.02', 'dd-mon-yy hh24:mi:ss') as change_date,  1299.00 as cost from dual union all
      5  select 4 as SR_NO, 'A1' as Auth_Code, to_date('15-FEB-09 07.00.00', 'dd-mon-yy hh24:mi:ss') as change_date,   789.00 as cost from dual union all
      6  select 5 as SR_NO, 'A3' as Auth_Code, to_date('14-FEB-09 08.18.56', 'dd-mon-yy hh24:mi:ss') as change_date,   312.00 as cost from dual union all
      7  select 6 as SR_NO, 'A4' as Auth_Code, to_date('14-FEB-09 08.19.02', 'dd-mon-yy hh24:mi:ss') as change_date,   233.00 as cost from dual)
      8  select * from data d where change_date = (select max(change_date) from data d2 where d.auth_code = d2.auth_code);
    
         SR_NO AUTH_CODE CHANGE_DATE       COST
    ---------- --------- ----------- ----------
             2 A2        14/02/2009        2839
             3 A1        15/02/2009        1299
             5 A3        14/02/2009         312
             6 A4        14/02/2009         233
    
    SQL>
    

    Kind regards

  • How to remove columns from the table on the master 1-0?

    I have an array of 96 columns with strings. I also have the array of int 96-elemets (mask) with 1 and 0.

    What I want to do is to is to remove (or hide - but I read that it is not possible) all the columns with index corresponding to 0 in the mask table.

    example:

    columns in the table

    1 2 3 4 5

    mask

    0 1 0 0 1

    I want to remove the columns 1, 3 and 4 and leave only 2 and 5 in my table.

    How can I do?

    If I create loop for with i as the index of the column, when I do DeleteTableColumns() columns number decreases, and I get an error of range out of

    Or do I have an option to hide the unnecessary columns (not set their width to 1, it's very ugly-looking)?

    Please help me (())

    Hello rovnyart!

    1. removal of columns in the table:

    I suspect that the reason why you get the out-of-range error is due to fact that in your loop, you delete the columns in the table, you'll eventually end up by referring to a column that no longer exists, because the other columns before it have been deleted. While you remove each column of your table in the loop for example, the column index number will move, because you deleted the other columns in front of her.

    To resolve this, even if you delete a column in your loop, make sure that you take also into account that the index of the column is moved because of the removed columns.

    2 hide columns in table:

    You can use the ATTR_COLUMN_VISIBLE attribute to hide columns in the table:

    http://forums.NI.com/T5/LabWindows-CVI-idea-exchange/add-attr-column-visible-attribute-for-table-Col...

    http://zone.NI.com/reference/en-XX/help/370051Y-01/CVI/uiref/cviattrcolumnvisible_column/

    3 alternatives:

    Note that another alternative would also use a tree instead, control as the tree control also supports the hidable columns:

    http://forums.NI.com/T5/LabWindows-CVI/table-hide-column/TD-p/569773

    Best regards!

    -Johannes

  • How to publish data from a table using the form

    Oracle forms6i

    Hai All

    I have download the data to the table of forms...

    My table T1 columns are in, out, intrinsically, introut, empname, empno


    and another table T2 consist of three columns is empno, date, time

    In table T2 time fields consist of symbol I, o... I mean IN, O OUT

    My Question is when an employee consist of 3 I - the three IN the time


    0815 I, 1200 I, 1415 I and OUT 3 times O 1245, 1445 O, O 1715 and empno is 001

    If there is no record for empno 001 then insert first 0815 I in table T1 in column IN time then

    to update 1200 intrinsically and 1245 update to Introut and 1415 up-to-date addin and 1445 to update addout


    Finally in 1715 to outtime

    If it is possible to do without Hardcoding the moment Pls tell with some good example


    Thanks in advance

    Srikkanth.M

    There now things are clear... whenever I have free I'll post the code u how to do this...

    for now, a few tips can help u

    -create the table to store operations travel so then u can't fix your code

    -Create the cursor on the T1 line through all the records.

    -Control what empno and action i.e. the current cursor (I or O) exists on the same date in T2 or not

    -otherwise exists insert a new record check also the SHIFT is coming in time IF is between MAJ 0815 and 1645 and action is 'I' then insert record and column values accordingly

    s ' there is, then update the record of the place where empno = cur.empno and attendance_date = mydate;

    It may be useful

    Baig,
    [My Oracle Blog | http://baigsorcl.blogspot.com/]

  • How to remove duplicates in two separate lines in SQL?

    Hello

    I need to identify the data in double with two separate lines. See my below data structure.
    INDEX OF NAMES NAME_1 START_DATE END_DATE FLAG VALUE
    B ON 275 SE 13/12/2005-31/12/2010 1
    SELF 1 375
    SELF 1 475
    ON 275 SE 2 B 13/12/2005-31/12/2010
    SELF 2 375
    SELF 2 475
    ON SE 175 13/12/2006 AND 31/12/2010 B 3
    SELF 3 375
    SE ON 3 475

    This is my sample data. Here, the data is mirrored with different index columns. INDEX 1 and 2 contains the same combination group. I so need to identify one of the combination double (i.e. INDEX 1 or 2). Anyone can come up with the exact solution?

    Thank you

    I thought it had to do with the order of the INDEX field. The query checks only the value of the previous INDEX value.

    I think I found what the problem was.

    Try this:

    with test_table as
    (select 'SUR' NAME, 'SE' NAME_1, '275' VALUE, to_date('13/12/2005','DD/MM/YYYY') START_DATE, to_date('31/12/2010','DD/MM/YYYY') END_DATE, 'B' FLAG, 1 IND from dual union all
    select 'SUR', 'SE', '375', null, null, 'A', 1 from dual union all
    select 'SUR', 'SE', '475', null, null, 'A', 1 from dual union all
    select 'SUR', 'SE', '275', to_date('13/12/2005','DD/MM/YYYY') ,to_date('31/12/2010','DD/MM/YYYY') ,'B', 2 from dual union all
    select 'SUR', 'SE', '375', null, null, 'A', 2 from dual union all
    select 'SUR', 'SE', '475', null, null, 'A', 2 from dual union all
    select 'SUR', 'SE', '175', to_date('13/12/2006','DD/MM/YYYY'), to_date('31/12/2010','DD/MM/YYYY'), 'B', 3 from dual union all
    select 'SUR', 'SE', '375', null, null, 'A', 3 from dual union all
    select 'SUR', 'SE', '475', null, null, 'A', 3 from dual union all
    select 'SUR', 'SE', 'IPT', to_date('13/12/2005','DD/MM/YYYY'), to_date('31/12/2010','DD/MM/YYYY'), 'B', 100 from dual union all
    select 'SUR', 'SE', '375',null, null, 'A', 100 from dual union all
    select 'SUR', 'SE', 'AO', null, null, 'A', 100 from dual union all
    select 'SUR', 'SE', 'IPT', to_date('13/12/2005','DD/MM/YYYY'), to_date('31/12/2010','DD/MM/YYYY'), 'B', 218 from dual union all
    select 'SUR', 'SE', '375' ,null, null,'A' ,218 from dual union all
    select 'SUR', 'SE', 'AM' ,null, null,'A' ,218 from dual union all
    select 'SUR', 'SE', 'IPT' , to_date('13/12/2005','DD/MM/YYYY'), to_date('31/12/2008','DD/MM/YYYY'), 'B', 334 from dual union all
    select 'SUR', 'SE', '375' ,null, null,'A', 334 from dual union all
    select 'SUR', 'SE', 'AP',null, null, 'A', 334 from dual union all
    select 'SUR', 'SE', 'IPT' , to_date('01/01/2009','DD/MM/YYYY'), to_date('31/12/2010','DD/MM/YYYY'), 'B', 335 from dual union all
    select 'SUR', 'SE', '375' ,null, null,'A', 335 from dual union all
    select 'SUR', 'SE', 'AP',null, null, 'A', 335 from dual union all
    select 'SUR', 'SE', 'IPT' , to_date('13/12/2005','DD/MM/YYYY'), to_date('31/12/2010','DD/MM/YYYY'), 'B', 336 from dual union all
    select 'SUR', 'SE', '375' ,null, null,'A', 336 from dual union all
    select 'SUR', 'SE', 'AP',null, null, 'A', 336 from dual)
    SELECT name,
           name_1,
           value,
           start_date,
           end_date,
           flag,
           ind,
           MIN(diff_flag) over(PARTITION BY NAME, NAME_1, IND) min_flag
      FROM (SELECT t3.*,
                   CASE
                     WHEN lag(VALUE, lag_flag)OVER(ORDER BY IND, start_date, VALUE) != VALUE AND flag = 'A' THEN
                      1
                     WHEN (lag(value, lag_flag)OVER(ORDER BY IND, start_date, VALUE) != value
                        OR lag(start_date, lag_flag) OVER(ORDER BY IND, start_date, VALUE) != start_date
                        OR lag(end_date, lag_flag) OVER(ORDER BY IND, start_date, VALUE) != end_date)
                        AND flag = 'B' THEN
                      1
                     WHEN lag_flag = 0 THEN
                      1
                     ELSE
                      2
                     END diff_flag
              FROM (SELECT t2.*,
                           first_value(lag_count_flag) OVER(PARTITION BY NAME, NAME_1, IND
                                                                ORDER BY NAME, NAME_1, start_date) lag_flag
                      FROM (SELECT t1.*,
                                   CASE
                                     WHEN FLAG = 'B' THEN
                                      lag(COUNT, 1, 0)
                                      OVER(ORDER BY IND, start_date, VALUE)
                                   END lag_count_flag
                              FROM (SELECT t.*,
                                           COUNT(*) over(PARTITION BY NAME, NAME_1, IND) COUNT,
                                           row_number() over(PARTITION BY NAME, NAME_1, VALUE,
                                                                          START_DATE, END_DATE, FLAG
                                                                 ORDER BY IND) row_number
                                      FROM test_table t) t1) t2) t3) t4
     ORDER BY ind,
              start_date,
              VALUE;
    

    Published by: Manuel Vidigal on Abr 13, 2009 18:18

  • How to remove virus from my computer in windows xp without using an anti-virus program? is this possible?

    Please tell if it is possible: D because I hate the stuff lol antivirus it slows down my computer please provide related info removal virus with output using an anti-virus and please suggest me some good anti-virus (avast bcz it does not support my system) with a download link

    Thanks in advance :)

    To get rid of the current problem you can restore your system to the State it was before the infection if you have made the system images.  Otherwise, see SpiritX advice in How to remove spyware from the computer

    You can use Microsoft Security Essentials in the future with an anti-spyware application [many are recommended in other threads].

  • Hi, I have cs6. I bought a picture on adobe stock to use in a design. I don't know how to remove it from my library and use effectively? Help please

    Hi, I have cs6. I bought a picture on adobe stock to use in a design. I don't know how to remove it from my library and use effectively? Help please

    Go to stock.adobe.com and log in with the user ID Adobe that you purchased the image.

    Click on the Images link at the top right of the page to go to your history of license

    Click on the thumbnail of the image of the image you want to use to access the page of image details

    In the center of the details page, you will see a big blue to choose link where you want to save the image to

  • Windows Live Movie Maker 2011 - how to remove items from the recent projects list

    Windows Live Movie Maker 2011

    I have duplicates on my list of recent projects.

    How to remove items from the numbered list of recent projects?  What are the (thumb)

    bugs used for?  Thank you.

    Hello

    The question you have posted is related to Windows Live Movie Maker and would be better suited in the Windows Live Solution Center. Please visit the link below to find a community that will provide the best support.

    http://www.windowslivehelp.com/product.aspx?ProductID=5

    Amrita M

    Microsoft Answers Support Engineer

  • How to remove photos from my iphone6s after their importation?

    How to remove photos from my iphone6s after their importation?

    Hello KConstant,

    I understand that you're looking to remove photos from your iPhone, after you import the to your Mac. It depends largely on how the images are imported into your Mac.

    If you use iCloud photo library, remove photos from your iPhone, after they have synched to the Photos on your Mac afterwards would remove these photos on your Mac as well, like iCloud photo library is designed to synchronize your iPhone with iCloud and Mac.

    However, if you are importing photos via the USB port of the Photos app, you should be prompted to delete pictures from your device once the import is complete:

    Once the import is complete, a message asks if you want to delete or keep the photos on your device. Click on remove items to remove photos or click on keep items to keep them on the device.

    Import photos and videos from your iPhone, iPad or iPod touch
    https://support.Apple.com/en-us/HT201302

    You can also (it not allowed you iCloud photo library on your iPhone), you can use the image capture on your Mac app to delete images from your iPhone. This can also be useful to remove the last images that have already been imported into the Photos on your Mac. Once you have selected the images you want in the Image Capture, you can click on the prohibitive red symbol () to delete the selected items.

    Image capture: transfer images and other elements of your device
    https://support.Apple.com/kb/PH17894

    Concerning

  • How to remove ps4ux from my mac?

    How to remove ps4ux from my macbook pro?

    1. use Malwarebytes Anti-Malware for Mac to remove adware

    https://www.Malwarebytes.org/antimalware/Mac/

    Download, install, open and run by clicking on the "Scan for Adware" button to remove the adware.

    Once this is done, exit Malwarebytes Anti-Malware.

    2 Disable Extensions and test them.

    Safari > Preferences > Extensions

    Select Disable all extensions and test them.

    Enable the Extensions one by one and test.

    To uninstall any extension, select it and click the "Uninstall" button

    3 safari > Preferences > Search > search engine:

    Select your preferred search engine

    4 safari > Preferences > general > home page

    Visit the site of your choice that it be the homepage

    Set your home page.

  • How to remove photos from my iPhone without deleting icloud photo library?

    My iPhone is full and I wanted to remove some photo to release some spaceso I supported the up to iCloud and I started to remove photos. ***? They are endangered to iCloud! Now, they're just gone. It's crazy! Image capture you can import to everywhere, but the function "delete after importing" seems to have disappeared. I'm sure this question has been beat to death, but how you remove photos from their phone without removing them from their photo library iCloud?

    So frustrating.

    Does anyone know of a solution to this?

    iCloud is a synchronization system, not just external storage.  Once you turn on photo library all you do with a photo is on ALL of your devices (including remove them).  See the last section in this article on how to recover pictures that you inadvertently deleted:

    iCloud: use iCloud photo library on your iOS device

    It is also here:

    Get help with your photo library - Apple Support iCloud

    How to remove pictures and videos from a camera using iCloud photo library?

    If you want to delete the pictures and videos of all your iOS, Mac and iCloud.comdevices, you can delete them in the Photos app.

    When you delete a photo or video of your Photos app, also will not delete your photo library and iCloud iCloud storage. You can retrieve your photos and videos from the album recently deleted for 30 days.

  • How to remove duplicate pictures

    I imported all my photos in the photo library. How to remove duplicates of Photos (version 1.3) on OS X El Capitan without 3rd party software?

    Photos don't have a tool to detect the duplicates library. It relies on detecting when you import photos.

    If you intentionally import duplicates, you can only search for them manually, for example by sorting the photos of the capture date, if duplicates will appear side-by-side in moments.

    To search for duplicates, you need third-party software. These three are safe to use with Photos:

  • How to remove photos from a mac that I get rid of without losing these photos on devices that I keep

    How to remove photos from a mac that I get rid of without losing these photos on devices that I keep

    Do not use iCLoud photo library - when you make any changes on any device are made on all devices

    LN

Maybe you are looking for