SELECT DISTINCT e.employeeNumber, e.lastName, e.firstName FROM customers c JOIN employees e ON c.salesRepEmployeeNumber = e.employeeNumber WHERE customerNumber IN ( SELECT DISTINCT o.customerNumber FROM orders o JOIN orderdetails od ON o.orderNumber = od.orderNumber JOIN products p ON od.productCode = p.productCode WHERE od.priceEach < p.MSRP );
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter