Structuring a query between multiple tabs to join values by name
<p>I'm trying to write a SQL query in Google Sheets to try and get data for "matching" results from two different tabs, but running into some trouble. </p>

<p>This is a sheet that's basically an automated scoring engine for instructors who take a two-part test (written and practical). After the results are entered, I'd like to use some SQL to take the results from the two tabs and collate them into a final score.</p>

<p><a href="https://docs.google.com/spreadsheets/d/1ClWU9Ua2gkGzSCjGSBa6SCai5rEyotk7Y0cYYgUC6L8/edit#gid=1168967887" rel="nofollow">Link to the sheet in question</a>.</p>

<p>There's a "Practical Scores" tab (which takes all the data from the associated Google Form), and a "Written Scores" tab. I'd like to get the name of the instructors who match in both those tabs, and give the associated score for them, but I'm mostly having trouble with writing the correct SQL.</p>

<p>Most of what I'm trying to do is working fine. I'm able to pull the final practical scores via the following SQL:</p>

<pre><code>=query(PracticalScores!A2:E, "select A, count(E),SUM(E)/3 group by A")
</code></pre>

<p>I can also pull the written scores as follows:</p>

<pre><code>=query('Written Scores'!B2:C,"select B,C")
</code></pre>

<p>But I want the intersection of the two as well, and that's where I'm running into problems.</p>

<pre><code>=query(A8:E, "select A,C,D where A = E")
</code></pre>

<p>will simply return the rows where the names match up, and I want the <em>instances</em> where the names match up, regardless of whether the rows do.</p>

<p>That is, I want all the rows where the names match from tab 1 to tab 2 and not just the few rows that happen to line up perfectly.</p>

<p>If I'm not explaining this well, please let me know and I can provide additional information. Any assistance would be very greatly appreciated!</p>