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
 SQL Server Development (2000)
 Help on a program

Author  Topic 

ndumbane
Starting Member

1 Post

Posted - 2005-04-14 : 09:11:24
Hi to all,

I am a real novice to SQL and I am trying to use some tutorial. Here is the
problem I cam across:

There is a table with gene_ids (‘gid’) and clone_ids (‘cid’). Each gene
only resides on a single clone and each clone may contain multiple genes.
How do you find how many genes are on each and every clone? Please provide
the SQL.

Your help will be much appreciated.

Ndumbane

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2005-04-14 : 09:21:10
Select Clone_ids, Count(*) as Number_of_gene_ids
from yourGenetable
group by Clone_ids

Jim
Users <> Logic
Go to Top of Page
   

- Advertisement -