Pregunta de entrevista de Cerberus Capital Management

SQL : write a code to calculate a quantity using data from two tables.