Forums: [SOLVED] Still having trouble with GROUP BY - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[SOLVED] Still having trouble with GROUP BY Does not sort properly in default Rate Topic: -----

#1 User is offline   John Rotella 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 34
  • Joined: 22-January 17

Posted 13 September 2017 - 07:24 PM

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/re...otters_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
John
0

#2 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15408
  • Joined: 03-February 03

Posted 14 September 2017 - 04:41 PM

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.
Best regards,
Sergey Kornilov
0

#3 User is offline   John Rotella 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 34
  • Joined: 22-January 17

Posted 14 September 2017 - 07:02 PM

View Postadmin, on 14 September 2017 - 11:41 AM, said:

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
0

#4 User is offline   John Rotella 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 34
  • Joined: 22-January 17

Posted 14 September 2017 - 09:52 PM

View Postadmin, on 14 September 2017 - 11:41 AM, said:

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
John
0

#5 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15408
  • Joined: 03-February 03

Posted 15 September 2017 - 02:49 PM

View needs to be in the database. "On the top of SQL Query" means using the same query when you create your view.
Best regards,
Sergey Kornilov
0

#6 User is offline   John Rotella 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 34
  • Joined: 22-January 17

Posted 15 September 2017 - 03:31 PM

View Postadmin, on 15 September 2017 - 09:49 AM, said:

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
0

#7 User is offline   John Rotella 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 34
  • Joined: 22-January 17

Posted 15 September 2017 - 11:34 PM

View Postadmin, on 15 September 2017 - 09:49 AM, said:

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.
John
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic