I have three tables which i have joined ..but the manner in which i have to display them is a little difficult for me to understand.I am trying to group them and not getting the desired result.
Sports_Name
Id | Name
---------
1 Football
2 Cricket
3 Hockey
4 Tenis
Teams
Id | Sport_Id | Team_Name
----------------------------
101 1 Manchester United
103 2 Australia
104 2 India
109 1 Real Madrid
110 3 New Zeland
Player_Name
Id | Team_Id | Player_Name
------------------------------
1 101 Rooney
2 104 Tendulkar
3 103 Ponting
4 109 Ronaldo
5 101 Van Persie
6 110 Simond
I need to display this information in the following manner..
**Football**
Manchester United -Rooney
Manchester United -Van Persie
Real Madrid -Ronaldo
**Cricket**
India-Tendulkar
Australia-Ponting
**Hockey**
New Zeland -Simond
and something similar for tenis
See this picture for details

Is this what you want?
This gets all the data in order then you just need to use your presentation layer to use sports.name as group header.
This produces
name team_name player_name
Cricket Australia Ponting
Cricket india Tendulkar
Football Man u Rooney
Football Man u RVP
Football Real Madrid Ronaldo
Hockey N Z Simond