MySQL sum results into a table grid format -
i have following sql code:
select distinct members_main.membership_type, payment_method,sum(amount_paid) members_main, members_payments members_main.contact_id=members_payments.contact_id group members_main.membership_type,payment_method
that returns following:
i want able return results in following table grid format:
does know if or how can within mysql?
thanks,
john
depending on data complexity either go bluefeet's way or if payment_method amount dynamic sounds need pivot table. try looking @ this.
Comments
Post a Comment