Skip navigation links

MySQL Forums :: Transactions :: Help Needed With Query - Join?


Advanced Search

Re: Help Needed With Query - Join?
Posted by: Felix Geerinckx ()
Date: December 01, 2005 06:18AM

David Bridges wrote:

> What I'm trying to get is the total of both,

Something like this perhaps?

SELECT horse_no, SUM(points)
FROM (
SELECT horse_no, points FROM places
UNION ALL
SELECT horse_no, points FROM champs
) AS t
GROUP BY horse_no;

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject Views Written By Posted
Help Needed With Query - Join? 1697 David Bridges 11/27/2005 07:55PM
Re: Help Needed With Query - Join? 1248 Brian Burke 11/29/2005 10:19AM
Re: Help Needed With Query - Join? 1256 Jay Pipes 11/29/2005 12:10PM
Re: Help Needed With Query - Join? 1259 David Bridges 11/30/2005 10:35PM
Re: Help Needed With Query - Join? 1220 Felix Geerinckx 12/01/2005 06:18AM
Re: Help Needed With Query - Join? 1242 David Bridges 12/08/2005 10:45PM
Re: Help Needed With Query - Join? 1207 Jay Pipes 12/09/2005 07:26AM
Help needed in migration 1379 beeresh g 01/31/2006 03:46AM
Re: Help needed in migration 1312 Jay Pipes 02/03/2006 06:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.