Re: Getting the sum() for a column from a joined table

2010-01-03 Thread Octavian Ra?ni??
agent=agents.id) > from agents > where agent.id=100 > > = > > > > best regards > > ACMAIN > >> To: mysql@lists.mysql.com >> From: orasn...@gmail.com >> Subject: Getting the sum() for a column from a joined table >> Date: S

RE: Getting the sum() for a column from a joined table

2010-01-02 Thread LIU YAN
= best regards ACMAIN > To: mysql@lists.mysql.com > From: orasn...@gmail.com > Subject: Getting the sum() for a column from a joined table > Date: Sun, 3 Jan 2010 01:35:49 +0200 > > Hi, > > I have 3 tables, `agents`, `clients` and `sales` and I want to select a

Getting the sum() for a column from a joined table

2010-01-02 Thread Octavian R��ni��
Hi, I have 3 tables, `agents`, `clients` and `sales` and I want to select a single agent from the `agents` table, and 2 more columns that contain the number of clients for the selected user (from the `clients` table) and the sum of the sales for the selected user (from the `sales` table). Is i