{smcl} {* 22dec2006}{...} {cmd:help dups} {hline} {title:Title} {p 5 18 2}{hi: dups} {hline 2} Describe and list duplicate records {title:Syntax} {p 8 15 2}{cmd:dups} {varlist} {ifin} [, {opt l:ist(spec)}] {phang}where {it:spec} is the body of any valid {cmd:list} command, and can include the dummy variable {cmd:#C} to refer to the number of copies. {title:Description} {pstd}{cmd:dups} displays a table showing the number of records that are duplicates on {varlist}, similar to {help duplicates report}, except that the number of {it:unique} records is listed instead of the number of {it:excess} records. {pstd}In addition, the {opt l:ist(spec)} option allows you to list any fields from relevant records. {title:Options} {phang}{opt l:ist(spec)} works just like the {help list} command, with the addition of allowing reference to the number of copies of a record with the dummy variable {cmd:#C}. If no explicit {cmd:if} condition is inlcuded in {it:spec}, the condition {cmd:if #C>1} is assumed; that is, the specified fields are listed for all duplicate records (ie, duplicates according to {varlist}). {title:Examples} {phang}To list the name and phone number for everyone with more than one record: {pmore}{cmd:. dups id, list(name phone)} {phang}To list the same info, only for people with 3 or more records: {pmore}{cmd:. dups id, list(name phone if #C>2)} {phang}Same thing, listing info only for records with age over 50: {pmore}{cmd:. dups id, list(name phone if #C>2 & age>50)} {phang}Similar, but calculating duplicates only among records with age>50: {pmore}{cmd:. dups id if age>50, list(name phone if #C>2)} {phang}Some more {cmd:list} options: {pmore}{cmd:. dups id if age>50, list(name phone if #C=2, noobs string(4) divider)} {title:Also see} {pstd}Online: help for {helpb duplicates}, {helpb list} {pstd}Contact: {browse "mailto:elliott.lowy@va.gov":Elliott Lowy}