title: Google Sheets query where other sheet equals
body: <p>I have a workbook with two sheets. I want to query a sheet called Farming that has rows of numbers associated with different objects which I want to sum over.</p>
  
  <p>I want to use query so that the two different sheets can be sorted and filtered without breaking.</p>
  
  <p>I have got this far:</p>
  
  <p><code>=query(Farming!A2:Z1000, 'select F+G+H+I+J+K+L where "Farming"!B="B7"', 0)</code></p>
  
  <p>Where the column B on each sheet is the unique reference number for the objects.
  However, I'm getting a syntax error and I'm not sure where to go from here.</p>
  
  <p>Thanks for your help!</p>