I have a table and data as follow.
Id(PK-Identity) ReqId(FK) Desc wCode
1 1001 some desc W
2 1001 some desc M
3 1001 some desc C
4 1002 some desc M
5 1003 some desc W
How can select all records from this table related to wCode 'W' and other records where ReqId is same for other records. In the above example all records should display except Id 4.