Thanks for response - it's not fro project tools, but from a custom add-on which I am working on.
Adding MIN(scst_fbposts.statusid) to the SELECT statement gets the lowest result for that column, but the other columns from that table are still out of order, hence why I am trying to order the scst_fbposts records before the grouping.
The two results which are being grouped (without the group by and count) are as follows:
=========================================
| taskid | enddate | recurring | fbqty | fbid | statusid |
=========================================
| 9 | 1185940800 | 3 | 1 | 11 | 8 |
| 9 | 1185940800 | 3 | 1 | 12 | 4 |
=========================================
And when grouped, they are showing like this:
=========================================
| taskid | enddate | recurring | fbqty | fbid | statusid |
=========================================
| 9 | 1185940800 | 3 | 2 | 11 | 8 |
=========================================
However, I want these grouped rows to be sorted first by statusid ASC because i need the end result to be this:
=========================================
| taskid | enddate | recurring | fbqty | fbid | statusid |
=========================================
| 9 | 1185940800 | 3 | 2 | 12 | 4 |
=========================================
.
|