 <cffunction name="maximum" returntype="any" access="public" output="false" hint="Calculates the maximum value for a given property. Uses the SQL function `MAX`. If no records can be found to perform the calculation on you can use the `ifNull` argument to decide what should be returned."
 	examples=
 	'
-		<!--- Get the amount of the highest salary for all employees --->
-		<cfset highestSalary = model("employee").maximum("salary")>
-		
-		<!--- Get the amount of the highest salary for employees in a given department --->
-		<cfset highestSalary = model("employee").maximum(property="salary", where="departmentId=##params.key##")>
-		
-		<!--- Make sure a numeric value is always returned, even if no records are found to calculate the maximum for --->
-		<cfset highestSalary = model("employee").maximum(property="salary", where="salary > ##params.minSalary##", ifNull=0)>
+		// Get the amount of the highest salary for all employees
+		highestSalary = model("employee").maximum("salary");
+
+		// Get the amount of the highest salary for employees in a given department
+		highestSalary = model("employee").maximum(property="salary", where="departmentId=##params.key##");
+
+		// Make sure a numeric value is always returned, even if no records are found to calculate the maximum for
+		highestSalary = model("employee").maximum(property="salary", where="salary > ##params.minSalary##", ifNull=0);
 	'
 	categories="model-class,statistics" chapters="column-statistics" functions="average,count,minimum,sum">
 	<cfargument name="property" type="string" required="true" hint="Name of the property to get the highest value for (must be a property of a numeric data type).">

				loc.properties = ListAppend(loc.properties, variables.wheels.class.calculatedProperties[loc.item].sql);
			}
		}
		arguments.select = arguments.select & loc.properties;

		// alias the result with `AS`, this means that Wheels will not try and change the string (which is why we have to add the table name above since it won't be done automatically)
		arguments.select = arguments.select & ") AS wheelsqueryresult";

		// call `findAll` with `select`, `where`, `parameterize` and `include` but delete all other arguments
		StructDelete(arguments, "type");
		StructDelete(arguments, "property");
		StructDelete(arguments, "distinct");
		
		loc.rv = findAll(argumentCollection=arguments).wheelsqueryresult;
		if (!Len(loc.rv) && Len(arguments.ifNull))
		{

<cffunction name="average" returntype="any" access="public" output="false" hint="Calculates the average value for a given property. Uses the SQL function `AVG`. If no records can be found to perform the calculation on you can use the `ifNull` argument to decide what should be returned."
	examples=
	'
		// Get the average salary for all employees
		avgSalary = model("employee").average("salary");

		// Get the average salary for employees in a given department
		avgSalary = model("employee").average(property="salary", where="departmentId=##params.key##");

		// Make sure a numeric value is always returned if no records are calculated
		avgSalary = model("employee").average(property="salary", where="salary BETWEEN ##params.min## AND ##params.max##", ifNull=0);
	'
	categories="model-class,statistics" chapters="column-statistics" functions="count,maximum,minimum,sum">
	<cfargument name="property" type="string" required="true" hint="Name of the property to calculate the average for.">
