title: SQL: Subselection from two tables
body: <p>I'm practising a bit on my SQL queries and I'm stuck here. I created a bunch of different tables and I want a table that retrieves different columns (redundantly at it sounds). The key here is the following: I want to select all the information related to the outputs' column from two different tables. The second table queried contains different attributes which corresponds to a third table's column. </p>
  
  <p>To do that, I wrote this:</p>
  
  <pre><code>select   l.output_name,   
           l.output_date,   
           (select *
              from elt.attribute_key
             where attribute = ('a', 'b', 'c')   
           )
    from   etl.output l  
   where   l.version = 'local'  
     and   l.country = 'DE'
  </code></pre>
  
  <p>It gave me errors, and I think it's due to the nonexistent joining between tables, but I don't know where I should add. Furthermore, I would like to know I 'm tackling it properly.</p>
  
  <p>Thank you for your help and time!</p>