Connecting Tech Pros Worldwide Help | Site Map

retrieve data

Newbie
 
Join Date: Sep 2007
Posts: 1
#1: Sep 21 '07
i have a table with two cloumns, first column have unique numbers from 1 to 10 and the second column have repeated numbers from 1 to 5. How can i write a query to get the data from second column as 1 is repeated these many times and 2 is repeated for these many times.........till 5.


thanks in advance
Rams
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#2: Sep 22 '07

re: retrieve data


Quote:

Originally Posted by Rams123

i have a table with two cloumns, first column have unique numbers from 1 to 10 and the second column have repeated numbers from 1 to 5. How can i write a query to get the data from second column as 1 is repeated these many times and 2 is repeated for these many times.........till 5.


thanks in advance
Rams

Ram,

Please POST what you have tried to achieve the results.

HINT: Make use of COUNT() and GROUP BY to achieve the results.

POST back if you are not able to form a query, we will help you out!!

Thanks
Amit
Reply