Hi everybody; I have a table like this;
|| NAME || IF_PURCHASED || COUNT || --------------------------------------- tom true 5 tom false 7 tom false 3 sam true 3 sam true 4 sam false 2 ben true 1 ---------------------------------------- i want to a select querry that can do this; || NAME || TRUE_TOTAL_COUNT || FALSE_TOTAL_COUNT || ---------------------------------------------------- tom 5 10 sam 7 2 ben 1 0 ---------------------------------------------------- I did this with 2 temporary tables. one of selects true total count , other selects false total counts then I JOINed them with UNION Can I do this in one select sql? __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]