MySQL Forums
Forum List  »  Newbie

Quarry If
Posted by: Terrence Berg
Date: August 10, 2010 02:18PM

SELECT fish.Boat_id, Landing_name, Boat_name, SUM(Albacore_Tuna) AS albacore
FROM tunafish
LEFT JOIN tunalandings ON tunafish.Landing_id = tunalandings.Landing_id
LEFT JOIN tunaboats ON tunafish.Boat_id = tunaboats.Boat_id
WHERE DATE > 1262307661 AND 1262307661 < 1293751403
GROUP BY Boat_id ORDER BY albacore DESC

My question is this, can i put a if statement in and any boat that returns 0 for the amount of fish exclude from the result set.

Options: ReplyQuote


Subject
Written By
Posted
Quarry If
August 10, 2010 02:18PM
August 10, 2010 02:35PM
August 10, 2010 09:07PM


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.