Need And,limit query

Hello,

I need to query on aerospike, i have 10cr data ex: "Select * from test.demo where gender=2 and degree=3 limit 1000 "

Please provide solution, Thanks in advance