Q:

MYSQL sum of costs for all employees for certain date

I am trying to write a mysql query that will list all employees, their job function, and the total costs of all jobs they did for a particular day.  Here is the relevant portion of my tables:
job_function table
emp_func
emp_num

employee table
emp_name
emp_num

job table
job_date
emp_num
job_name

job_type table
cost
job_name

The query works except that it is only returns the employees that had a job for that particular day.  If an employee had no job that day they do not show up.  I need to to display all employees, even those that had no job that day.  Any suggestions on how to do that?  Here is my query:
SELECT
employee.emp_name,
job_function,emp_func,
SUM(job_type.cost)
FROM
employee
INNER JOIN job ON job.emp_num = employee.emp_num
INNER JOIN job_function ON job_function.emp_num = employee.emp_num
INNER JOIN job_type ON job.job_name = job_type.job_name
where job_date = '2016-04-16'
group by emp_name;

A:

You need a left join to get results even if there are no rows in the left joined table that fit the on-condition; the values in columns of the left joined tables are returned as null in such cases.  
You also need to move your where-condition to the on-condition; your where would otherwise require the date in the job-table to be 2016-04-16, so it has to exist (and not be null), which would make the left join behave like a join again. 
SELECT 
  employee.emp_name,
  job_function.emp_func,
  SUM(job_type.cost)
FROM employee
JOIN job_function ON job_function.emp_num = employee.emp_num
left JOIN job ON job.emp_num = employee.emp_num and job.job_date = '2016-04-16'    
left JOIN job_type ON job.job_name = job_type.job_name
group by employee.emp_name, job_function.emp_func;

I also fixed your group by and added the emp_func-column there, since you select that column.  This would otherwise result in an error in MySQL 5.7+ with default settings, and otherwise might give you wrong results in cases where an employee has more than one function.