On 10/20/2013 1:14 PM, John Meyer wrote:
Semi-solved, I think.

I managed to join the following:

SELECT "AGENTS"."AGENT_ID", COUNT(*) AS "Total Sales" FROM "AGENTS" INNER JOIN "SALES" ON "AGENTS"."AGENT_ID"="SALES"."SALES_REP" GROUP BY "AGENTS"."AGENT_ID"

The only problem is I can't seem to add the agent's name.


I ended up solving the problem by breaking up the query into two subqueries: one to count the results and the other to join the information with the name. It isn't the most elegant solution int he world, but it works!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org

Reply via email to