Views custom sorting
In the end I created a custom module with a Views Sort handler to write the custom ORDER sql.

function custom_module_views_query_alter(&amp;$view, &amp;$query) {
  if($view-&gt;name === 'viewname') {
    /**
     * Order = (rating * 10) – (hours old / 2)
     * Note: the rating field is divided by 2 because in the DB the rating is out of 100
     */
    $view-&gt;query-&gt;orderby[0]['field'] = "(if(field_data_field_rating.field_rating_rating, field_data_field_rating.field_rating_rating,0) / 2) - ROUND((UNIX_TIMESTAMP(NOW())-created)/60/60/2)";
    $view-&gt;query-&gt;orderby[0]['direction'] = "DESC";

    $view-&gt;query-&gt;orderby[1]['field'] = "created";
    $view-&gt;query-&gt;orderby[1]['direction'] = "DESC";
  }
}


For this to work you either have to add the SQL JOINS in this module or add the rating and posted date fields as a 'sort' in your view.