I don't know if this is going to give you exactly what you want but try running it in SQL Analyser and see if it does (my SQL skills are not great and I created this a couple of years ago so don't recall exactly what it does). You'll need to change nice_cls_calls_0001 to your current call table.
-- This script has been created to do an export to get a list of non-recorded extensions.
-- The script searches a call table for all records that have failed to record and creates a
-- temporary table 'temptable' that stores the station (extension number), agent id, and a recorded
-- variable. It then rechecks the same call table to see if any calls for that station have been
-- recorded and if so deletes that agents row.
-- It then does a check on the Agent Id and displays a result of station, agent id, agent first
-- and last names. This can then be manually exported and used as a list of non-recorded extesnions
-- create a temporary table 'temptable'
create table temptable (station int, agent_id int, recorded char)
-- insert all non recorded calls
insert into temptable (station, agent_id, recorded)
select distinct station, agent_id, '0'
from nice_cls_calls_0001
where recorded = 'N' and agent_id != 0
-- mark rows for extensions that have a recorded call
update temptable
set recorded = 1
from nice_cls_calls_0001, temptable
WHERE nice_cls_calls_0001.station = temptable.station
and nice_cls_calls_0001.recorded = 'Y'
-- delete rows for extensions that have a recorded call
delete
from temptable
where recorded = 1
-- display results including agent name
select temptable.station, temptable.agent_id, user_info.firstname, user_info.lastname
from user_info,temptable
where temptable.agent_id = user_info.agentid
-- delete the temporary table 'temptable'
drop table temptable