"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
If you want other fields too, besides the category and (maximum) score you can use a subquery.
SELECT category , MAX(score) AS maxScore FROM places WHERE active = '1' GROUP BY category If you want other fields too, besides the category and (maximum) score, you can use a subquery: SELECT p. Category , p. Score , p.
Title , p. Otherfield , ... FROM places AS p JOIN ( SELECT category , MAX(score) AS maxScore FROM places WHERE active = '1' GROUP BY category ) AS grp ON grp. Category = p.
Category AND grp. Maxscore = p. Score WHERE p.
Active = '1' ORDER BY maxScore DESC As @zekms pointed, this will this will produce multiple rows (with same category) if there are several rows with the same category and max score.
This can produce unexpected results if there are several rows with the same category and score – zerkms Jul 21 at 0:10 Unexpected no, but multiple, yes. I should add that to the answer, thnx. – ypercube Jul 21 at 0:17 thanks, solution with sub query produce more sophisticated results, more important all values are correct!
– Nazariy Jul 21 at 0:39.
SELECT category, MAX(score) max_score FROM places WHERE active = 1 GROUP BY category ORDER BY max_score DESC, RAND().
– Nazariy Jul 20 at 23:59 @Nazariy: sure, edited my answer – zerkms Jul 21 at 0:04 unfortunately after validating data I found that returned results are still wrong, category is correct, score is correct, title is wrong... Looks like it takes first title from database not the actual one – Nazariy Jul 21 at 0:12 @Nazariy: it is not possible, by definition – zerkms Jul 21 at 0:13 @Nazariy: The query from zerkms does NOT have title ... – ypercube Jul 21 at 0:20.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.