oracle8.1.6 select count(*) from survey_responses, acs_objects where survey_id=:survey_id and response_id=object_id and initial_response_id is null select max(response_id) from survey_responses where survey_id=:survey_id and survey_response.initial_user_id(response_id)=:user_id and initial_response_id is null select survey_response.initial_response_id(:response_id) as initial_response_id from dual select max(response_id) as response_id,count(*) as unfinished from survey_responses r, acs_objects o where finished_p='f' and r.response_id=o.object_id and creation_user=:user_id and survey_id=:survey_id