sqldf answered my prayers and more. Thanks a lot! -- View this message in context: http://n4.nabble.com/How-to-implement-a-select-distinct-x-count-distinct-y-group-by-x-for-a-data-frame-tp1288418p1288489.html Sent from the R help mailing list archive at Nabble.com.