Many beginning developers, new to SQL, force CF to do work that SQL could do
Performing a query within a loop over another query is almost always a missed opportunity for a join
And rather than looping over a record set to get a count, use SQL COUNT() aggregate function
Rather than perform input conversions in CF, and then need to manage that code among several apps, do it instead in the database as trigger or stored procedure
Consider stored procedures rather than performing SQL in CFQUERY