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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bringing a particular value

Status
Not open for further replies.

saina

Programmer
Jan 19, 2006
8
US
Hello,
I am kinda beginner in sql. I have to bring teh rows of particular value .
I have a table which has column where the values X or Y.I need to bring count of the rows which has value X.

Thanks for your help
 
My query is
a.name,b.title,b.sex from tbl a,tbl b where b.title in('Manager','General Manger') group by a.name,b.title

i need to bring rows which has count of female population who hold a particular title and also count of male population who hold a particular title.

like count of managers who are female is 20 and count of general managers who are male is 15 and column b.sex has values F,M

it will be helpfull if someone can help
 
check that link i gave you, and look for the COUNT() function

also, you will need to learn how to write a proper join

search in google for "sql table join syntax"

it seems that you are really very new to SQL in general, so you should take a tutorial first

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top