Page 1 of 1

MySQL "Distinct, Count, Group By" issue

Posted: Fri Apr 17, 2009 9:44 am
by disconne
in a table like below:
articleno______ipno
10__________1.1.1.1
20__________2.2.2.2
10__________1.1.1.1
10__________3.3.3.3
20__________1.1.1.1
30__________5.5.5.5
30__________5.5.5.5
30__________5.5.5.5
30__________6.6.6.6
30__________7.7.7.7
30__________2.2.2.2

I want a result with sql like this
articleno__________Count of Distinct Values
10_____________________2
20_____________________2
30_____________________4

Can you please help by writing also the echo command line with sql line

thanks