> 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.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to