title: Subquery without where-clause
body: <p>Here's my code</p>
  
  <pre><code>SELECT res.type, 
         res.contactname, 
         res.id, 
         res.inv_addressline2, 
         res.inv_addressline3, 
         res.signup_date,
         res.engineer_id_global, 
         res.job_id_global, 
         res.neg_or_pos, 
         res.rating, 
         res.author_id_global,
         res.timestamp_global, 
         res.short_description, 
         res.job_title, 
         res.feedback, 
         author_data.contactname AS `author_name`, 
         review_count.total_feedback, 
         review_count.total_rating 
  FROM (SELECT mb.type, 
               mb.contactname, 
               mb.id, 
               mb.inv_addressline2, 
               mb.inv_addressline3, 
               mb.signup_date,
               fb.engineer_id AS `engineer_id_global`, 
               fb.timestamp AS `timestamp_global`, 
               fb.job_id AS `job_id_global`, 
               fb.neg_or_pos, 
               fb.rating, 
               fb.feedback, 
               fb.author_id AS `author_id_global`,
               ac.engineer_id, 
               ac.timestamp, 
               ac.author_id,
               jb.job_id, 
               SUBSTR(jb.job_description, 1, 200) AS `short_description`, 
               jb.job_title 
        FROM " . MEMBERS_TABLE . " AS mb 
        LEFT JOIN " . ACCEPTED . " AS ac 
               ON mb.id = ac.engineer_id 
        LEFT JOIN " . FEEDBACK . " AS fb 
               ON ac.job_id = fb.job_id 
        LEFT JOIN " . JOBS . " AS jb 
               ON fb.job_id = jb.job_id 
        WHERE mb.type = 2 
        ORDER BY
              fb.timestamp DESC
       ) AS res 
  LEFT JOIN
      (SELECT mb.id, 
              mb.contactname, 
              fb.author_id 
       FROM " . MEMBERS_TABLE . " AS mb 
       LEFT JOIN " . FEEDBACK . " AS fb 
              ON fb.author_id = mb.id 
       LIMIT 1
      ) AS `author_data`  
         ON res.author_id_global = author_data.author_id 
  LEFT JOIN
      (SELECT COUNT(fb.engineer_id) AS `total_feedback`, 
              SUM(fb.rating) AS `total_rating`, 
              fb.engineer_id 
       FROM " . FEEDBACK . " AS fb 
      ) AS `review_count` 
         ON res.engineer_id_global = review_count.engineer_id 
  GROUP BY res.contactname
  ORDER BY res.contactname
  </code></pre>
  
  <p>I'm just starting to get my head around SQL. My worry is the second and third inner query. Am I right in saying it will return <em>all</em> results as there is no where clause and the return the results from that using the "ON" statement or is the "ON" statement combined with the initial query?</p>