Hi,
I have a table with ± twenty thousand records (invoice line items), which are all assigned to 7 different teams. I would like to select the top25 records of each team (not the top 25 of the whole table). With this I then would create a report showing for each team the top 25 customers and a 26th line showing the rest.
Searching the forums didn't help me solve this, so maybe there is somebody who knows how to write a query like this.
I have considered an alternative; writing a query that flags each record that belongs in a top25 of a team + a query that sum the results. This seems so awkward in writing and in maintenance that I rather find a more elegant solution, if it exists of course.
Maarten
I have a table with ± twenty thousand records (invoice line items), which are all assigned to 7 different teams. I would like to select the top25 records of each team (not the top 25 of the whole table). With this I then would create a report showing for each team the top 25 customers and a 26th line showing the rest.
Searching the forums didn't help me solve this, so maybe there is somebody who knows how to write a query like this.
I have considered an alternative; writing a query that flags each record that belongs in a top25 of a team + a query that sum the results. This seems so awkward in writing and in maintenance that I rather find a more elegant solution, if it exists of course.
Maarten