Your question is not very clear.
You have to enter_query and type the value in required fields of Master block and then execute query.
To do this , you have to create a Master-Data Relationship using Data Block Wizard.
In Object navigator, Click on a Data-block and select Data Block Wizard from Tools.
In that click on Master-Detail block and then uncheck Auto-join Data Blocks, click on Create Relationship (Based on Join Condition)
and select the required block and click 'OK'.
One more thing you have to check is , in the property palette of Datablock , set Query All Records to 'YES' to query all records.