>My table is:
>I want the result:
You seem to want to turn rows into columns. That's often called a
table". There's a step-by-step for pivot tables at
http://www.artfulsoftware.com/queries.php#24. There're other pivot
table examples on the same page.