select count(category_id)
from ttracker_categories
where package_id = :package_id
select count(ticket_id)
from ttracker_tickets
where category_id = :category_id
select name, category_id
from ttracker_categories
where package_id = :package_id
and category_id <> :category_id