•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 423,750 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,311 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 940 | Replies: 2 | Solved
![]() |
I've been away from sql for quite a well and need a little push to get restarted. Need to report out of a single table, with values coming out of only two columns.
Need to group items from column 1 as the left column in the ouput table with totals for each type in column two forming the row for the grouped item. To look something like:
Category Type 1 Type 2 Type 3 Type 4
abc 5 3 1 40
def 10 8 8 5
---------------------------------------------------------------
Total 15 11 9 45
Should be easy stuff, right? I don't have the option of pulling the query into a script otherwise this would be almost painfully easy in php or perl
thanks much!!
Jim
Need to group items from column 1 as the left column in the ouput table with totals for each type in column two forming the row for the grouped item. To look something like:
Category Type 1 Type 2 Type 3 Type 4
abc 5 3 1 40
def 10 8 8 5
---------------------------------------------------------------
Total 15 11 9 45
Should be easy stuff, right? I don't have the option of pulling the query into a script otherwise this would be almost painfully easy in php or perl
thanks much!!
Jim
•
•
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 176
Reputation:
Rep Power: 2
Solved Threads: 20
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
"Others make web sites. We make web sites work!"
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Column data to column heading (MS SQL)
- Problems with PC (Viruses, Spyware and other Nasties)
- Hard to Query (MS SQL)
- hijack log...zlob??? help guys please (Viruses, Spyware and other Nasties)
- SQL Report Help (MS SQL)
- error in the program (C)
Other Threads in the MySQL Forum
- Previous Thread: command prompt view
- Next Thread: query


Linear Mode