[eluser]Bigil Michael[/eluser]
query me used
Code:
SELECT * FROM candidate_details
WHERE
candidate_votes IN (SELECT MAX(candidate_votes) FROM candidate_details
WHERE
candidate_votes <> (SELECT MAX(candidate_votes) FROM candidate_details))
this code print correct result.
when i added 2 extra conditions like this
Quote:SELECT * FROM candidate_details
WHERE
candidate_votes IN (SELECT MAX(candidate_votes) FROM candidate_details
WHERE
candidate_votes <> (SELECT MAX(candidate_votes) FROM candidate_details))
AND constituency_id = '2' AND elect_year = '2011'
it prints 0 rows
can anyone help me????
thanks in advance.....