title: How to add weights for records to find to most matching results
body: <p>I'm developing a web application using ASP.net web forms C# and SQL service for the database. I've three main tables:</p>
  
  <pre><code>Services: ( more than 10K records)
  
  Service_Id      Service_Description 
   1               Clean
   2               Oil Change
   3               Fluid Services
   4               Filter Replacement
  </code></pre>
  
  <p>the other table for customer requests </p>
  
  <pre><code>Customer_Requests:
  Customer_ResuestId      Customer_RequstedServices 
   1                      1
   1                      2
   1                      3
   1                      4
   2                      4
   2                      5
  </code></pre>
  
  <p>the third main table is branches ( I've like 500 branches; each branch offers specific services )</p>
  
  <pre><code>Branches:
  Branch_Id      Branch_AvailabeServices 
   1               1
   1               2
   1               3
   2               1
   2               2
   2               3
   2               4
  </code></pre>
  
  <p>My question, How can I add weights for each Customer_RequstedServices and to find to most matching results. For example, I want the results to be something like that:</p>
  
  <p><strong>Customer request #1</strong></p>
  
  <p>has <strong>4</strong> service requests ( <strong>25% for each request</strong> ) </p>
  
  <p><strong>Branch #2</strong> offers <strong>100%</strong> of his requests, and <strong>Branch #1</strong> offers <strong>75%</strong> of his requests.</p>
  
  <p>I want to show branch #2 at first as it offers all customers requirements. </p>
  
  <p>I was able to get the weight by using:</p>
  
  <pre><code>Select count(Customer_ResuestId) as ServiceCount from Customer_Requests
  </code></pre>
  
  <p>then I can do 100/ServiceCount to get the weights for each record.</p>
  
  <p>but I do not know how can I find that what services can be offered by each branch for each specific request..</p>
  
  <p>Any help would be really appreciated. If the weights something that can not/difficult to be measured, then finding the branch the offers the most requested service would be really great and acceptable.</p>