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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Query Problem

Author  Topic 

real_pearl
Posting Yak Master

106 Posts

Posted - 2004-07-20 : 04:52:46
Wafer Bin X Y
X123 Bin1 1 32
X123 Bin1 1 33
X123 Bin1 1 34
X124 Bin1 1 32
X124 Bin1 1 33
X124 Bin1 1 34

How I may write a query returning the COUNT of BIN for a particular X, Y position. I mean

Bin Count for Bin1 on X, Y (1,32) should be 2 as Bin1 Lies on the same coordinates in two different wafers. Please guide me how to write the query

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2004-07-20 : 05:03:26
select bin,x,y,count(*) as num
from table
group by bin,x,y

CiaO

*##* *##* *##* *##*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page

drymchaser
Aged Yak Warrior

552 Posts

Posted - 2004-07-20 : 09:03:45
select x,y, count(*)
from table
group by x,y
Go to Top of Page
   

- Advertisement -