I'm looking for the best way to order a result set based on the 'most viewed' count of another table?
I have a products table and a history table. The history table stores the view count of the products and is linked in by the product_id.
What is the best way to order the product listing by the 'view_count' column in the history table?
Thanks for help with this.