Hello,
I am stuck on what is probably a very easy select query.
The query is:
Select Count(*), Distinct PID, ID, Name
From Table 1
Group By PID
I get:
| Count | PID | ID | Name |
--------------------------------------------------------
| 130 | GGT | 50 | Andy |
| 60 | AAM | 51 | Graeme |
| 360 | RGG | 52 | John |
Now, there are 130 records with a PID of GGT. Why has "Andy" been returned
in the row? There is a William in the row at the end of the alphabet. I
want to sort INSIDE THE COUNT on Name Desc, but when I use Order By Name
Desc, it ignores it. Very hard!!!
Any help is greatly appreciated!
Gary.
PS - Sorry if I have no explained this properly - very hard.