I am trying to retrieve a column twice from one table for ex:
select M.Event_Name as 'Male',
F.Event_Name as 'Female'
from Table1 M, Table1 F
where M.Gender = 'M'
and F.Gender = 'F'
and F.Country = 12
and M.Country = 12
Table1 data
ID Event_Name Gender Country
1 Cricket M 12
2 FootBall M 13
3 BasketBall M 12
4 Hockey M 12
5 Tennis M 13
6 Volly Ball M 13
7 Cricket F 13
8 FootBall F 13
9 BasketBall F 12
10 Hockey F 13
11 Tennis F 12
12 Volly Ball F 12
What I Got is :
Male Female
Cricket Tennis
Cricket BasketBall
Cricket Volly ball
BasketBall Tennis
BasketBall BasketBall
BasketBall Volly ball
Hockey Tennis
Hockey BasketBall
Hockey Volly ball
Expecting:
Male Female
Cricket Tennis
BasketBall BasketBall
Hockey Volly ball
Help me out.. Thanks