Sales Per Employee Including the Quiet Ones

For every employee return their name, the number of sales they closed as sales, and the total value of those sales as total.

Every employee must appear, including the ones who closed nothing. For those employees report 0 sales and a total of 0.00 — not NULL.

Order by name.

Expected output


name  | sales | total
------+-------+--------
Alice | 3     | 1950.50
Bob   | 1     | 9000.00
Carol | 2     | 100.00
Dan   | 0     | 0.00
Erin  | 0     | 0.00
PostgreSQL

Press Run to start the SQL engine.

SensAI
Beta
Tap the mic to stop voice mode