Databases Querying Relational Databases Joining Table Data with SQL JOIN Queries

Truman Smith
Truman Smith
Full Stack JavaScript Techdegree Graduate 17,901 Points

Querying Relational Databases - challenge task 3

My query

SELECT SalesRep.FirstName, SalesRep.LastName, SUM(Sale.SaleAmount) FROM Sale INNER JOIN SalesRep ON SalesRep.SalesRepID = Sale.SalesRepID GROUP BY SalesRep.SalesRepID

returns the error, something like, "your query didn't return FirstName, LastName, SaleAmount."

what am I overlooking that's wrong?

2 Answers

Steven Parker
Steven Parker
182,229 Points

The challenge is asking for a query that will return these values on each sale. So you won't need the aggregate function SUM, or any "GROUP BY" clause.

Truman Smith
Truman Smith
Full Stack JavaScript Techdegree Graduate 17,901 Points

Oh. I implied something that wasn't there. Thanks for the clarification Steven.