MySQL Error Updating Opportunities

Running 8.4.2. Fresh install with only the official Outlook plugin installed. Brand new to SuiteCRM. Have tried a few different repairs. When updating opportunity “assigned to” user we have a user with very slow website response times (5 minutes to update this field) and we see this error in the suitecrm.log file:

Thu Nov 16 22:57:58 2023 [5512][a5336f74-ab85-3b6b-dafd-655402c871b9][FATAL] Mysqli_query failed.
Thu Nov 16 22:57:58 2023 [5512][a5336f74-ab85-3b6b-dafd-655402c871b9][FATAL] Query Failed: SELECT opportunities.sales_stage, SUM(opportunities.amount_usdollar) as amount_usdollar FROM opportunities LEFT JOIN opportunities_cstm ON opportunities.id = opportunities_cstm.id_c LEFT JOIN users jt0 ON opportunities.modified_user_id=jt0.id AND jt0.deleted=0

AND jt0.deleted=0 LEFT JOIN users jt1 ON opportunities.created_by=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 LEFT JOIN users jt2 ON opportunities.assigned_user_id=jt2.id AND jt2.deleted=0

AND jt2.deleted=0 LEFT JOIN accounts_opportunities jtl3 ON opportunities.id=jtl3.opportunity_id AND jtl3.deleted=0

LEFT JOIN accounts accounts ON accounts.id=jtl3.account_id AND accounts.deleted=0
AND accounts.deleted=0 LEFT JOIN campaigns jt4 ON opportunities.campaign_id=jt4.id AND jt4.deleted=0

AND jt4.deleted=0 where opportunities.deleted=0 AND opportunities.amount_usdollar is not null AND opportunities.sales_stage is not null GROUP BY opportunities.sales_stage DESC LIMIT 0,21: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘DESC LIMIT 0,21’ at line 12

Hi, welcome to the Community! :tada:

Are your PHP versions and DB versions inside the matrix?

mysql Ver 8.0.35-0ubuntu0.22.04.1
PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)

Yes sir. I only reinstalled everything twice when settings up to make sure :rofl:

There’s a tip on that same error here