title: Selecting a single row from a joined table per row of main table
body: <p>I've tried working through some previous answers, but they aren't making a lot of sense.</p>
  
  <p>I have two tables, one of "groups" representing real-world groups of people, and one of "events" representing meetings of the group.</p>
  
  <p>I've got a terribly simple query that selects the groups, to show them in a list on the website, and a separate query on the group profile page that lists their upcoming meetings, and I'm unsure what technique to use to add the "next meeting" to the list of groups, ideally it needs to be returned as another column in the MySQL query.</p>
  
  <p>I've been fine with joins before, but limiting the number of joined results to one, per row in the first table, doesn't seem to straightforward.</p>
  
  <p>Any simple advice on what technique would work to show this?</p>
  
  <p>Thanks!</p>
  
  <p>Rough schema as follows;</p>
  
  <pre><code>CREATE TABLE `groups` (
    `id` varchar(12) NOT NULL,
    `title` varchar(30) NOT NULL,
    PRIMARY KEY (`slug`)
  )
  
  CREATE TABLE `events` (
    `id` int(6) NOT NULL AUTO_INCREMENT,
    `group` varchar(20) NOT NULL,
    `title` varchar(50) NOT NULL,
    `start` datetime NOT NULL,
    `finish` datetime NOT NULL,
  PRIMARY KEY (`id`)
  )
  </code></pre>