-
Junior Member
Rerieve data from single column table
Hi,
I have a table called 'T1' in that i have column like 'Gender', in that column i have 'male' and 'female' values. How to retrieve count(male) and count(Female) from T1.
Last edited by admin; 02-15-2008 at 07:23 AM.
-
Expert Member
Re: Rerieve data from single column table
Select sum (decode (sex,'male', 1,0)) MALE, sum (decode (sex,'female', 1,0)) FEMALE , count (decode (sex,'M', 1,'F', 1)) TOTAL from t1;
-
Expert Member
Re: Rerieve data from single column table
Try this one also
select gender,coun(*) from t1 group by gender;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules