Cotiviti Interview Question

Sql syntax,Problem on profit,loss and discount)