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

Recommended Answers

All 2 Replies

Thanks for the pointer to the dev zone at mysql.com. I think I followed enough of that to make some headway!!

thanks much,

Jim

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.