TCC – Finding Duplicate Emails (Having Clause)

In a perfect world, we would all have a 3 day work week, get 2 months of vacation a year, doughnut Friday would be every day and candidate databases wouldn’t have duplicate email addresses. Well that’s the hand we’re dealt and I can’t do anything about the first three but can at least try to give you some data on the latter.

If you’re looking to pull a list of email addresses and the count for them to give you an idea of what you’re up against use the process below.

Create an empty file called: CandidateEmailCountExport_sq.xml

Add the following code:


<?xml version="1.0" encoding="UTF-8"?>
<quer:query productCode="RC1501" model="http://www.taleo.com/ws/tee800/2009/01" projectedClass="Candidate" locale="en" mode="CSV" csvheader="true" largegraph="true" preventDuplicates="true" xmlns:quer="http://www.taleo.com/ws/integration/query">
	<quer:subQueries/>
	<quer:projections>
		<quer:projection>
			<quer:field path="EmailAddress"/>
		</quer:projection>
		<quer:projection alias="CNTEmail">
			<quer:count>
				<quer:field path="EmailAddress"/>
			</quer:count>
		</quer:projection>
	</quer:projections>
	<quer:projectionFilterings/>
	<quer:filterings/>
	<quer:sortings/>
	<quer:sortingFilterings/>
	<quer:groupings>
		<quer:grouping>
			<quer:field path="EmailAddress"/>
		</quer:grouping>
	</quer:groupings>
	<quer:groupingFilterings>
		<quer:groupingFiltering>
			<quer:greaterThan>
				<quer:count>
					<quer:field path="EmailAddress"/>
				</quer:count>
				<quer:string>1</quer:string>
			</quer:greaterThan>
		</quer:groupingFiltering>
	</quer:groupingFilterings>
	<quer:joinings/>
</quer:query>
<span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span>

WARNING!!! This is one of those that if you open it in the GUI, make a change and save it, it will erase the groupingFilterings and groupingFiltering, any edits should be made in your favorite text editor.