1 Replies - 848 Views - Last Post: 07 October 2012 - 09:24 PM

#1 lcfjoertoft  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 32
  • Joined: 09-July 11

Counting and grouping a table

Posted 07 October 2012 - 06:09 AM

I have the following table:

Column A: Names (Here just A and B, but the whole table consists of real names)
Column B: Just the number 1
Column C: ID number

A 1 NO2857
B 1 NO3044
A 1 NO3447
A 1 NO3887
A 1 NO3887
B 1 NO3887
A 1 NO3887
B 1 NO3887
B 1 NO3887

This goes on for about 800 rows, and has between 1 and 90 "pairs" of A and B based on column C.

I need to group and count this so that, based on column C, those with paired A and B in column A get sumarized.

In the above example, the desired result would be:

A 1 NO2857
B 1 NO3044
A 1 NO3447
A 3 NO3887
B 3 NO3887

Or even better:

A 1 NO2857
B 1 NO3044
A 1 NO3447
A,B 3 NO3887

Is this at all posible?

Is This A Good Question/Topic? 0
  • +

Replies To: Counting and grouping a table

#2 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: Counting and grouping a table

Posted 07 October 2012 - 09:24 PM

just use the group by operator
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1