Phil A Q&D way to do this is add a column called Try. Write a quick loop to populate the try column with the try value restarting after each Applicant ID resets. Be sure and order the data by CallTime first. The resulting table should have the data as shown below.
AppID CallTime Result Try 1 1/5/2005 no sale 1 1 1/15/2005 no sale 2 1 1/25/2005 sale 3 1 1/26/2005 no sale 4 12 1/5/2005 no sale 1 12 1/15/2005 no sale 2 12 1/16/2005 no sale 3 12 1/25/2005 sale 4 12 1/26/2005 no sale 5 Now your query is SELECT * FROM tblName WHERE Result = "sale"; Good Luck Hal Hal McGee Engineering Data Manager Group Engineering - Process and Compliance Seating Products Group B/E Aerospace Winston-Salem, NC "Phil Simon" <[EMAIL PROTECTED] .net> To Sent by: AccessDevelopers@yahoogroups.com AccessDevelopers@ cc yahoogroups.com Subject [AccessDevelopers] ranking question 10/11/2005 04:12 PM Please respond to AccessDevelopers@ yahoogroups.com I was wondering if someone could help me out. What would be the best way for me to go about determining the sale number from the following table: applicantID calltime result 1 1/5/05 no sale 1 1/15/05 no sale 1 1/25/05 sale 1 1/26/05 no sale 12 1/5/05 no sale 12 1/15/05 no sale 12 1/16/05 no sale 12 1/25/05 sale 12 1/26/05 no sale the resulting query would provide: applicantID saleattempt 1 3 12 4 etc. Ultimately, I am trying to figure out how many attempts needed to make a sale. Thank you... ps Please zip all files prior to uploading to Files section. YAHOO! GROUPS LINKS Visit your group "AccessDevelopers" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/q7folB/TM --------------------------------------------------------------------~-> Please zip all files prior to uploading to Files section. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessDevelopers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/