Daily Tickets with comments

This is a script/report that will list all the tickets that have comments on them for the day and the tech who made the comment. I have this script set up to email on a daily basis to our managers. For how to email a report, please see this link by Justin Davison- http://community.spiceworks.com/how_to/show/382. I was tasked to create a script and have it email so that the Director would not have to log into spiceworks to see the tickets and comments, he gets a run down of comments on a ticket for the day in an email.

Source Code

This script has not been checked by Spiceworks. Please understand the risks before using it.

@Versasuite- Could you go further into what you mean by 'display ONLY the role "Admin". The way we use spiceworks is that we do not have a user portal, IT puts the tickets in so we are all admin's and then it shows up on the report.
-Jason

I would like to only display comments from my "Admin" roles. They are the folks that are entering the comments I need to see. Seeing comments from standard AD staff such as "It is broke" doesn't help. Haha.

I was able to make it work as listed below:
select
tickets.id as "Ticket ID",
tickets.created_at as "Ticket Created on",
tickets.summary as "Summary/Subject",
tickets.status as "Status",
comments.created_at as "Comment created at",
users.first_name || " " || users.last_name as "Commented by",
comments.body as "Comment"
from users,comments,tickets
where comments.created_by=users.id
and users.role='admin'
and comments.ticket_id=tickets.id
and comments.created_at>=date('now','-1 days')
order by tickets.id DESC​