Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpmcaa!nacer From: nacer@hpmcaa.mcm.hp.com (Abdenacer Moussaoui) Newsgroups: comp.databases Subject: SQL select,group by, nested??? Message-ID: <1910001@hpmcaa.mcm.hp.com> Date: 20 Jul 89 16:18:08 GMT Organization: HP McMinville Division Lines: 19 Consider the following select stmt which lists the distribution of teachers per department and gives the corresponding percentages select deptname, teacher, count(*) no.of.teachers, count(*) / 125 * 100 percentage from dept group by deptname, teacher ; 125 is the current total. How can I make this select compute the 125 (ie. select count(*) from dept) so that it isn't hard-coded like in the above example. I use Informix. Thank you! -- nacer@mist.orst.cs.edu