MySQL Getting two different total amounts based on criteria

4 posts were split to a new topic: Applying Front-End Logic to a Database Query