The following link gives you a snapshot of a question that I was asked and it to be done using MySQL. I would appreciate if someone can help me answer this.
https://w