title: Complicated Join Query, Join 3 tables with multiple group bys
body: <p>I have 3 tables:</p>
  
  <h3>Tweets:</h3>
  
  <pre><code>CREATE TABLE tweets (
      text_content    VARCHAR(280) not null,
      username        VARCHAR(50) not null,
      timestamp       TIMESTAMP not null DEFAULT current_timestamp,
      id              UUID not null DEFAULT uuid_generate_v4(),
      CONSTRAINT      tweets_pk PRIMARY KEY (id)
  );
  </code></pre>
  
  <h3>Likes:</h3>
  
  <pre><code>CREATE TABLE likes (
      username        VARCHAR(50) not null,
      timestamp       TIMESTAMP not null default current_timestamp,
      post_id         UUID not null,
      CONSTRAINT      likes_pk PRIMARY KEY (username, post_id),
      CONSTRAINT      likes_post_id_fk FOREIGN KEY (post_id) REFERENCES tweets(id)
  );
  </code></pre>
  
  <h3>And Retweets</h3>
  
  <pre><code>CREATE TABLE retweets (
      username        VARCHAR(50) not null,
      timestamp       TIMESTAMP not null default current_timestamp,
      post_id         UUID not null,
      CONSTRAINT      retweets_pk PRIMARY KEY (username, post_id),
      CONSTRAINT      retweets_post_id_fk FOREIGN KEY (post_id) REFERENCES tweets(id)
  );
  </code></pre>
  
  <p>I need a query, that would select all tweets, along with the amount of likes and retweets they have.<br>
  I did manage to write a working query, but I think I over-complicated it, and would love to hear simpler solutions!</p>