SQL Query Error

what does the DB structure look like?