select
rl.date 'Date / Time',
concat(u.username,' (',u.fullname,' )') 'Downloaded By User',
g.name 'User Group',
r.ref 'Resource ID',
r.title 'Resource Title',
rt.name 'Resource Type'

from
resource_log rl
join resource r on r.ref=rl.resource
left outer join user u on rl.user=u.ref
left outer join usergroup g on u.usergroup=g.ref
left outer join resource_type rt on r.resource_type=rt.ref
where
rl.type='d'
and
rl.date>=date('[from-y]-[from-m]-[from-d]') and rl.date<=adddate(date('[to-y]-[to-m]-[to-d]'),1)
order by rl.date