Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dIstinct count

Status
Not open for further replies.

hnunez4399

Programmer
Apr 10, 2003
62
US
What would be the easist way to do the following..
I have two files being appeneded together with the fields below.

Unique sku#
Units
file1identifier


I want to get the count of unique skus for each file... Total units for each file and then a grand total of unique skus for both files and total units for both files...

Any help would be appreciated.
Thx,



 
A starting point...

Code:
SELECT t.file1identifier
, Count(t.[unique sku#]) as CountofSKU
, Count(t.Units]) as CountofUnits

FROM tblYourTable as t

GROUP BY t.file1identifier

Sample data and expected results are always good :)

~Melagan
______
"It's never too late to become what you might have been.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top