I's so sorry. You are very correct. The sample data is bad. ID should be unique. Here it is corrected.
|ID | vendor_no | date | |2354 | 578 | "2005-12-23"| |2355 | 334 | "2005-12-24"| |2356 | 339 | "2005-12-26"| |2357 | 339 | "2005-12-26"| |2358 | 339 | "2005-12-26"| |2359 | 445 | "2005-12-26"| |2360 | 522 | "2005-12-27"| |2361 | 522 | "2005-12-27"| [EMAIL PROTECTED] wrote: > I am a novice when it come to queries such as this and was hoping > someone could help me write a query that tells me how many records > have the same ID and vendor number. > > |ID | vendor_no | date | > |2354 | 578 | "2005-12-23"| > |2355 | 334 | "2005-12-24"| > |2356 | 339 | "2005-12-26"| > |2357 | 339 | "2005-12-26"| > |2358 | 339 | "2005-12-26"| > |2359 | 445 | "2005-12-26"| > |2354 | 522 | "2005-12-27"| > |2355 | 522 | "2005-12-27"| > > Would I use select count? Any help would be greatly appreciated. I'd need a clearer spec to offer advise. What results would you want from the example data? 2354 is there twice but with different vendor numbers. And 522 is there twice with different IDs. One interpretation of "[records with] the same ID and vendor number" is 0 because no record has both the same as any other. A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower.