title: getting data from multiple tables
body: <p>I have three tables - shop, potato, and tomato (tomato table looks like potato table). The id in the potato table is accually the id of the shop - so the price of the potato in that shop.</p>
  
  <pre><code>+----+-------+-----------+
  |         potato         |
  +----+-------+-----------+
  | id | price | date_time |
  +----+-------+-----------+
  
  +----+-----+-----+------+------+  
  |             shop             |
  +----+-----+-----+------+------+
  | id | lat | lng | name | geom |
  +----+-----+-----+------+------+
  </code></pre>
  
  <p>What I'd like to do, is select all the shops which are max 10 km from some position, along with the tomato and potato price.</p>
  
  <p>Now, I have this query, which can select shops, along with potato price</p>
  
  <pre><code>SELECT
      shop.lat,
      shop.lng,
      shop.id,
      potato.date_time AS potato_date,
      potato.price as potato_price 
  FROM 
      shop,
      potato 
  WHERE
      potato.id = shop.id AND 
      ST_DWithin(
          ST_GeomFromText('POINT(xx.xxxxxx yy.yyyyyy)',4326),
          shop.geom,
          10*1000,
          true
      );
  </code></pre>
  
  <p>But I'd like to get also the price of the tomatoes in that shop. How could it be done?</p>