title: Querying all data from MySQL employees sample database
body: <p>I'm trying to query all the data from the MySQL Employees sample database. (<a href="http://dev.mysql.com/doc/employee/en/sakila-structure.html" rel="nofollow">structure</a> and <a href="http://dev.mysql.com/doc/employee/en/employees-validation.html" rel="nofollow">row counts</a>)</p>
  
  <p>I'm trying to do this in a way that preserves the relationships between all the tables, but I've never had to query a database this last, and honestly, I'm getting lost in Joins and such. I would really appreciate any help.</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>Edit: SQL:</p>
  
  <pre><code>SELECT *
  FROM
      `employees`
      LEFT JOIN `salaries`
        ON `employees`.`emp_no` = `salaries`.`emp_no`
      LEFT JOIN `dept_manager`
        ON `employees`.`emp_no` = `dept_manager`.`emp_no`
      LEFT JOIN `titles`
        ON `employees`.`emp_no` = `titles`.`emp_no`,
      JOIN
        `departments` on `departments`
          ON `departments`.`dept_no` = `dept_emp`.`dept_no`
  
  LIMIT 50;
  </code></pre>