select lv.name, lv.variable_id from logger_variables lv, logger_project_var_map lpvm where lpvm.variable_id = lv.variable_id and lpvm.project_id = :project_id select lp.name, lp.project_id from logger_projects lp, logger_project_pkg_map lppm where lp.project_id = lppm.project_id and lppm.package_id = :package_id order by name