SELECT maxapps.app, maxapps.description, maxgroup.groupname, maxgroup.description, (SELECT COUNT(*) FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app AND optionname='READ') appread, (SELECT COUNT(*) FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app AND optionname='SAVE') appsave, (SELECT COUNT(*) FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app AND optionname='INSERT') appins, (SELECT COUNT(*) FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app AND optionname='DELETE') appdel FROM maxapps, maxgroup ORDER BY maxapps.app, maxgroup.groupname;
SELECT maxapps.app, maxapps.description, maxgroup.groupname, maxgroup.description, CURSOR (SELECT optionname FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app) AS auth FROM maxapps, maxgroup ORDER BY maxapps.app, maxgroup.groupname;
SELECT maxapps.app, maxapps.description, maxgroup.groupname, maxgroup.description, (SELECT COUNT(*) FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app AND optionname='READ') appread, (SELECT COUNT(*) FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app AND optionname='SAVE') appsave, (SELECT COUNT(*) FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app AND optionname='INSERT') appins, (SELECT COUNT(*) FROM applicationauth WHERE groupname=maxgroup.groupname AND app=maxapps.app AND optionname='DELETE') appdel FROM maxapps, maxgroup WHERE maxapps.app='ASSET' ORDER BY maxapps.app, maxgroup.groupname;
Labels: application, intermediate, security, sql