It would HELP ALOT if you would WRITE THE QUERY AT FIRST AND TESTING IT WITHOUT ALL THE COLDFUSION JUNK! = P

Once you have your result set, u could start substituting the some of the field names in ur test query with actual CF code.

Most of the time when there is more than 1 coding language used, it could get real messy and UGLY that PEOPLE DO ACTUALLY MAKE FUNDAMENTAL MISTAKES AND FORGET THE BASICS.