Pregunta de entrevista de Plinc

Logic puzzles, some basic SQL, maths/probability.