openoffice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Meyer <johnme...@pueblocomputing.com>
Subject SQL problem
Date Sun, 20 Oct 2013 18:03:15 GMT
Relevant tables and fields:

Agents
TSR Varchar(6)

Sales
SalesRep Varchar(6)

neither is a primary key (I'm having problems converting it to a primary 
key when I import the data from a spread sheet).

I want to find out how many sales each agent got.


Statement:
     SELECT "Agents"."TSR", "Agents"."Agent", COUNT(*) FROM "Agents" 
INNER JOIN "Sales" ON "Agents"."TSR" = "Sales"."Sales Rep"

Gives me a not in aggregate function or group by clause.

Any ideas while I search for the answer?

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


Mime
View raw message