-
A Different Select Per Column (Like the Union for Rows a Union For Columns)
Hello People,
I have the following request since long time ago. I use MySQL 4.1 for our Applications. Some times a get to the time that I need to do a select or present a result witht the following format.
Table 1 - List of Customers
Table 2 - List of Bills for Customers
Table 3 - List of Payments done by the Customer
For example I whant to do a select that will put in on row the following information:
Columns 1 = Customer Name
Column 2 = SUM(All bills that are in statis = 'Active')
Column 3 = SUM(All Payments done by the Customer)
Column 4 = AVG(Average of Bill Totals for this Customer)
Is there a way to do this in SQL? And if so would it be thru TempTables ?
Thanks For the Help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|