I am trying to make a query to run reports. I am trying to have it search a range of dates and check to see how much work a user has done. Closed_by
is the field that would show the users number meaning they completed the work and op_id
means they submitted the work. Is there a way I can get a breakdown to report what each individual has done?
<cftry>
<cfquery name="received" datasource="dns">
Select *
FROM dbo.Dealer_Track_Work
WHERE Date_Received between <cfqueryparam value="10/13/2015" />
AND <cfqueryparam value="10/26/2015" />
WHERE Closed_by <cfqueryparam value="192" />
AND op_id <cfqueryparam value="192" />
</cfquery>
<cfdump var="#received#" label="received">
<!---<cfquery name="users" dbtype="query">
Select *
FROM received
WHERE Closed_by <cfqueryparam value="192" />
AND op_id <cfqueryparam value="192" />
</cfquery>
<cfdump var="#users#" label="users">--->
<cfcatch type="any">
<cfset result.error = CFCATCH.message >
<cfset result.detail = CFCATCH.detail >
</cfcatch>
</cftry>