Using group by to get multiple names in same address?
Posted: Thu Jul 05, 2007 11:58 pm
Sounds cryptic I know
let me explain.
I have a table of people and their details that have attended courses at our institution and we want to do a mailout to them.
That's fine and easy, but what is happening is that we are printing envelopes for 5 people that come from the same business, hence increasing our postage bills dramatically.
I would like to be able to do some kind of join / grouping where MySQL will return all the people that attended the courses, but only have it show the one address.... yet... erm... well, I think I just caught myself out.
I need the NAMES of the people and to know what salon they're from too don't I? If I want to put them in the same envelope... sigh..
I know how to show just the single salons. I do that with:
I guess what I need then, is to see a list of people that that DOESN'T return a result, so we can print them and stick them in the envelopes also...
I'm not even sure if there's a question here, but any advice would REALLY be appreciated
Rob
I have a table of people and their details that have attended courses at our institution and we want to do a mailout to them.
That's fine and easy, but what is happening is that we are printing envelopes for 5 people that come from the same business, hence increasing our postage bills dramatically.
I would like to be able to do some kind of join / grouping where MySQL will return all the people that attended the courses, but only have it show the one address.... yet... erm... well, I think I just caught myself out.
I need the NAMES of the people and to know what salon they're from too don't I? If I want to put them in the same envelope... sigh..
I know how to show just the single salons. I do that with:
Code: Select all
select * from education_attendees group by salon_name order by salon_name ascI'm not even sure if there's a question here, but any advice would REALLY be appreciated
Rob