Ello all! I've got a table that captures users activity on a points spending site.
my statement table has the follwoing fields: date, points, calcType, userId calcType is boolean, where 0 = - AND 1 = + What I've been asked to do is simply show 3 peices of data: Total points added Total poitns spent Total points left over... So, I've got a query SELECT SUM(points) as earned FROM `statement` as earnedTable WHERE earnedTable.calctype = 1 But I'm convinced there's gotta be away to join the table with itself and get the calcType = 0 total too... the final query, I just want 2 fields.. I can work out the thrid myself... So, any ideas? Tris... -- Give a man a fish and he'll feed himself for a day. Give a man a religion and he'll starve to death praying for a fish. Anon `We are what we pretend to be, so we must be careful what we pretend to be.` Kurt Vonnegut `When a person can no longer laugh at himself, it is time for others to laugh at him.` Thomas Szasz ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: [email protected] To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with.
