I need help with a select query. I have a database of products.
Each product has a category, and a sold field. There are say.. 10 products per category. I need a sql statement that will give me a set of random unique products, 1 from each category, and order the whole set by the count sold. Can this be done? Thanks for your help. If not in mysql.. what is the fastest, most efficient way to do this with arrays or somthing. I have somthing that works already, but its bulky and slow, i figured i could acomplish it all with the right query. Anyways.. thanks.
Sql Select Query
Moderator: General Moderators