title: In one query, get length of last name, length of first name and group by lengths - three columns
body: <p>I'm a noob...and working on a homework problem. </p>
  
  <p>Have a members table with last_name, first_name. I want to write one query that aggregates the length of last_name, first_name by string length. </p>
  
  <p>The output would have three columns - name_length, count_of_last_names, count_of_first_names.</p>
  
  <p>Two individual queries:</p>
  
  <pre><code>`SELECT LENGTH(last_name) AS "LnameLen", COUNT(LENGTH(last_name)) AS "CntLnameLen"
  FROM members
  GROUP BY LENGTH(last_name)
  ORDER BY "LnameLen" DESC;
  
  SELECT LENGTH(first_name) AS "FnameLen", COUNT(LENGTH(first_name)) AS "CntFnameLen"
  FROM members
  GROUP BY LENGTH(first_name)
  ORDER BY "FnameLen";`
  </code></pre>
  
  <p>But I want to write <em>one</em> query that outputs what the above two queries do, so the output would be three columns: Length_of_Name, CntLnameLen, CntFnameLen. </p>
  
  <p>Suggestions? Thanks!</p>