i've the below table.
i want to select all userid's where rank=1 and program='tennis' AND rank=2 and program='cricket' AND rank=3 and program='football'. As per the table data the result should be user2 and user3.
i tried the below but i doesn't seem to work. Can someone please help out.
select userid from table
where (rank=1 and program='tennis') and (rank=2 and program='cricket') and (rank=3 and program='football')