title: Scalar subquery produced more than one element, using UNNEST
body: <p>I have the following sentence, as I have read, the <strong>UNNEST</strong> should be used, but I don't know how</p>
  <pre><code>select
  (
    select 
      case 
        when lin = 4 then 1
        when lin != 4 then null
      end as FLAG,
    from table_1
    WHERE
      table_1.date = table_2.date
    AND
      table_1.acc = table_2.acc
  ) as FLAG
  FROM
    table_2
  </code></pre>
  <p>I have a lot of subqueries and that's why I can't use LEFT JOIN.
  Currently my table_2 has 13 million records, and table_1 has 400 million records, what I want is to be able to show a FLAG for each account, knowing that the data universes are different.</p>