Jump to content

Counting And Grouping


djp1988
 Share

Recommended Posts

I have a table like so:ID | Ref | ip1 | 6 | 110.10.2.12 | 7 | 112.132.0.13 | 6 | 110.10.2.14 | 8 | 119.10.2.15 | 5 | 110.0.2.16 | 7 | 105.10.1.17 | 6 | 101.10.2.0I wish to do an SQL to get the following result:Ref | Total6 | 37 | 25 | 18 | 1counting the total of each distinct ref. and ordering the resultsI think i need to do an inner join but I don't know how

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...