This topic is locked
[SOLVED]

 Still having trouble with GROUP BY

9/13/2017 3:24:14 PM
PHPRunner General questions
John Rotella author

I use this SQL
SELECT

(Finder),

COUNT(1),

LAST(Timestamp)

FROM Results

WHERE (Finder IS NOT NULL) AND (Finder <>"R")

GROUP BY (Finder)

ORDER BY COUNT(1) DESC

It has not been working since 9.6, the COUNT(1) DESC is ignored. See the results: http://tbird.info/registry/Spotters_list.php It defaults to alphabetical search. Within the PHP Runner Results tab for the query, it works properly, highest count to lowest. But in output it does not work properly.
I uploaded and tried Build 29520 today, the count does not sort properly on default in the output.
I would appreciate any help. Thank you.

John

admin 9/14/2017

While I do not have a solution I can offer a workaround. Create a view in your database on the top of this query and use it as a datasource in PHPRunner.

John Rotella author 9/14/2017



While I do not have a solution I can offer a workaround. Create a view in your database on the top of this query and use it as a datasource in PHPRunner.



Thank you I think I know what to do, I will try it.

John

John Rotella author 9/14/2017



While I do not have a solution I can offer a workaround. Create a view in your database on the top of this query and use it as a datasource in PHPRunner.



Do you mean to create a view in the Access database, or a view in PHP Runner? Not sure what you mean by "on top"....please explain thanks

admin 9/15/2017

View needs to be in the database. "On the top of SQL Query" means using the same query when you create your view.

John Rotella author 9/15/2017



View needs to be in the database. "On the top of SQL Query" means using the same query when you create your view.



OK thanks.

John Rotella author 9/15/2017



View needs to be in the database. "On the top of SQL Query" means using the same query when you create your view.



Thanks I understand now what to do, and achieved the correct results. I will publish later.