Use outer joins here instead of inner joins