MySQL Forums
Forum List  »  Newbie

Re: Doing calculations in linked tables.
Posted by: David Ashman
Date: January 25, 2008 11:28AM

Something like...

CREATE VIEW asset_status AS
SELECT,, SUM(tasks.status)/COUNT(*) as overall_status
FROM assets, tasks
WHERE = tasks.linked_asset_id

should work!

Options: ReplyQuote

Written By
Re: Doing calculations in linked tables.
January 25, 2008 11:28AM

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.