I have one teacher table containing school code,teacher details like sex,name etc.I want to count those schools having only male teachers(ie no female teachers).Bcoz corresp to one school there can be multiple records.Its very urgent.Pls help me if somebody has soln?(i need the SQL query full code)

Questions by kshivani

Showing Answers 1 - 4 of 4 Answers

sajid mohammadi

  • May 4th, 2006
 

select  distinct schoolcode    from teacher  where  schoolcode  not in ( select  schoolcode  from teacher where sex='female')

  Was this answer useful?  Yes

namita

  • May 12th, 2006
 

select count(distinct schoolcode) from ( select schoolcode from teacher where sex <> 'female') ;

  Was this answer useful?  Yes

Annapurna

  • Sep 20th, 2006
 

select (rowid) count*(distinct schoolcode)

    from ( select schoolcode(rowid)

                from teacher

                   where sex !=  'female') ;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions