Why don't you simply add these conditions in the where clause of your original sql query ?

select f.account_num, f.account_name, s.origin_gbloc, avg(ff.q4), avg(ff.q5), count(1)
from f01names2 f, ff_cust_survey ff, shipment s
where ff.gbl_to = s.gbl_to
and f.account_num = s.origin_agent
and f.account_num = 1
and s.origin_gbloc = 'GTFL'

group by f.account_num, f.account_name, s.origin_gbloc
order by avg(ff.q4) DESC

HTH & Regards,

RBARAER