SQL Challenge #2: Top-ten Members Analysis
phpBB Doctor SQL Challenges
This is the second SQL Challenge from the phpBB Doctor. It is my hope that this series of posts will be interesting but educational as well. The concept is simple: I will post a challenge that must be solved with (unless stated otherwise) a single SQL statement. No php code, no “insert into…” temporary tables, just one simple (or more likely not-so-simple!) SQL statement. There is often more than one way to solve the same problem, so I personally will be interested to see some of the solutions that are presented. Eventually I will post my original answer and optionally the best answers (judged by me) submitted to the challenge as well. Some of the challenges will use phpBB tables and data, others may use special data that I will create and make available for you to download.
What do you win? You win the knowledge that you solved a challenge. Is that enough for you?