G
Guest
I have this in table:
Joe xyz
Fred xyz
Lou xyz
Fred xyz
Lou xyz
Lou xyz
(the xyz is just random data...there are other data columns..and a primary
key field too)
What I need is to return just the top occuring [name] field records. In
this case the Lou records because there are three.
Or return the top 2 occuring name field records. In this case it would be
the Lou and Fred records.
I will set the top X occuring as a fixed value - probably 10 in the real
table. (I don't need to make it variable by the user - but I will probably
vary it occasionally.)
Have surfed around thinking this to be a common need - but am still not
quite clear on the approach to take...thanks in advance to input....
Joe xyz
Fred xyz
Lou xyz
Fred xyz
Lou xyz
Lou xyz
(the xyz is just random data...there are other data columns..and a primary
key field too)
What I need is to return just the top occuring [name] field records. In
this case the Lou records because there are three.
Or return the top 2 occuring name field records. In this case it would be
the Lou and Fred records.
I will set the top X occuring as a fixed value - probably 10 in the real
table. (I don't need to make it variable by the user - but I will probably
vary it occasionally.)
Have surfed around thinking this to be a common need - but am still not
quite clear on the approach to take...thanks in advance to input....