select id,(select id from opportunities) from contact where LeadSource != 'Web'
I can see that you have asked more question on SOQL, I strongly recommend you to take a look into the trailhead which helps you learn about salesforce platform http://developer.salesforce.com/trailhead
Here is the SOQL query documentation - https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/