<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qml SYSTEM "/wt/query/qml/qml.dtd">
<qml bypassAccessControl="true">
	<parameter name="Resolved After  (YYYY:MM:DD)" type="java.lang.Object"/>
	<parameter name="Resolved Before (YYYY:MM:DD)" type="java.lang.Object"/>
	<statement>
		<query>
			<select distinct="true" group="true">
				<object alias="Change Notice (wt.change2.WTChangeOrder2)" heading="Change Notice (wt.change2.WTChangeOrder2)" propertyName=""/>
				<function heading="DocCount" name="COUNT" type="java.math.BigDecimal">
					<column alias="Modifiable" heading="Dernière itération" isExternal="false" propertyName="latestIteration" selectOnly="false" type="boolean">
						iterationInfo.latest
					</column>
				</function>
			</select>
			<from>
				<table alias="Change Activity" isExternal="false" outerJoinAlias="Change Notice (wt.change2.WTChangeOrder2)">
					wt.change2.WTChangeActivity2
				</table>
				<table alias="Change Notice (wt.change2.WTChangeOrder2)" isExternal="false">
					wt.change2.WTChangeOrder2
				</table>
				<table alias="Document" isExternal="false" outerJoinAlias="Change Activity">
					wt.doc.WTDocument
				</table>
				<table alias="Part (wt.part.WTPart)" isExternal="false" outerJoinAlias="Change Activity">
					wt.part.WTPart
				</table>
				<table alias="Modifiable" isExternal="false">
					wt.change2.Changeable2
				</table>
			</from>
			<where>
				<compositeCondition type="and">
					<condition>
						<operand>
							<column alias="Change Notice (wt.change2.WTChangeOrder2)" heading="Resolution Date" isExternal="false" propertyName="resolutionDate" selectOnly="false" type="java.sql.Timestamp">
								resolutionDate
							</column>
						</operand>
						<operator type="lessThan"/>
						<operand>
							<parameterTarget name="Resolved Before (YYYY:MM:DD)"/>
						</operand>
					</condition>
					<condition>
						<operand>
							<column alias="Change Notice (wt.change2.WTChangeOrder2)" heading="Resolution Date" isExternal="false" propertyName="resolutionDate" selectOnly="false" type="java.sql.Timestamp">
								resolutionDate
							</column>
						</operand>
						<operator type="greaterThan"/>
						<operand>
							<parameterTarget name="Resolved After  (YYYY:MM:DD)"/>
						</operand>
					</condition>
				</compositeCondition>
			</where>
			<linkJoin>
				<join name="wt.change2.IncludedIn2">
					<aliasTarget alias="Change Notice (wt.change2.WTChangeOrder2)"/>
					<aliasTarget alias="Change Activity"/>
				</join>
				<join name="wt.change2.AffectedActivityData">
					<aliasTarget alias="Modifiable"/>
					<aliasTarget alias="Change Activity"/>
				</join>
			</linkJoin>
		</query>
	</statement>
</qml>
