This intro might seem long and unnecessary, but it is important to understand the conditions. I've been at this for several hours and I can't seem to find a solution. I'm using Java so using multiple queries and calculating it in Java is also a solution, but not the most efficient one. Keep in mind that I'm a mere IT student.This intro might seem long and unnecessary, but