I don't think you can do that in MySql as it does not support functions as MSSQL does.
Anyways you can take a look at this post to have an idea.
http://p2p.wrox.com/topic.asp?TOPIC_ID=1787
I made you table structure look similar to what it shows in the above post. But unable to proceed from there as the post deals with Functions there on, which is not supported in MySql(
AFAIK)
SELECT a.sid, b.sname, c.aname
FROM story_author a, stories b, authors c
where a.sid=b.sid and a.uid=c.uid
Sid Sname aname
------------------------------
1 Our First joe
1 Our First Bob
2 Lone Story Bob
Also you can take a look at the cross-tab report at MS site, to see if that suits you. I tried this, but didnot work as I expected, may be I am doing something wrong.
http://msdn.microsoft.com/library/de...qd_14_04j7.asp
Let us know if you get it solved.
Cheers!
-Vijay G