Jump to content

Counting And Grouping


djp1988

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...