Hello suvmitra,
There is no "simple select" syntax to produce what you want in picture 2. However, you can achieve it by using
either:
1) A crosstab query, for which Access provides a reasonably user-friendly wizard; or
2) Using a SELECT with subqueries, which IMHO is a far inferior approach to the crosstab
Regards,
Patrick