Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Vack
Aged Yak Warrior
530 Posts |
Posted - 2013-01-07 : 13:08:57
|
[code]Table Name: imtagfilitem_no bin_no Lot_no ABC 11 3B ABC 11 3B ABC 12 3BI'm looking for a select statement that will return the number of records for each matching bin and lot number. item_no bin_no lot_no countABC 11 3B 2ABC 12 3B 1[/code] |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2013-01-07 : 13:39:01
|
selectitem_no,bin_no,lot_no,count(*) as [count]from imtagfilgroup byitem_no,bin_no,lot_no Too old to Rock'n'Roll too young to die. |
|
|
|
|
|