I get an error "One of parameters (value: sort_name) is not of the type MysqlColumnNameOrAlias" when trying to access most of my data
Hi managed to get the same issue

One of parameters  (value: total_amount) is not of the type
MysqlColumnNameOrAlias

I had Drupal 7 and CiviCRM 5.4
I did recently changed my PHP version to 7.4 - which is the reason for the above error message - I guess I need to upgrade my CiviCRM to latest that should fix the issue(will try and update the result)
For now I have just changed my PHP version back to 7.2 which worked alright
Hope this helps!!!