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)
 select rows in programmer table

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-10 : 00:47:53
rajeev writes "sir,

I have programmer table ,in this prof1(proficiency), prof2(proficiency) are the columns. I want to retrive which language is known by the most of the programmers. The data in the table is like this,


name    prof1 prof2 

rajeev c c++
lochan c++ oracle
ramya oracle c
mani oracle java


based on the above data can U please send the query for this.

rajeev"

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-06-10 : 09:34:39
Somebody nees a lesson in normalization . . .

To accomplish this you need a derived rowset as your from clause using a UNION ALL to select from prof1 and then from prof2. Once you have the rowset you can group by and count . . .

post ddl and sample data and we can help you with the specific query syntax . . .

<O>
Go to Top of Page
   

- Advertisement -