Hi All, How do I get either of these statements to work? I could have sworn I've done this a million times before but it's late and my brain is caffeine-clogged... I want to select records where the sum of the severity_minutes field is greater than 30? I tried: SQL> edit Wrote file afiedt.buf 1 select distinct instance,sum(severity_minutes) as sev_sum 2 from history_view 3* where sum(severity_minutes) > 30 SQL> / where sum(severity_minutes) > 30 * ERROR at line 3: ORA-00934: group function is not allowed here SQL> edit Wrote file afiedt.buf 1 select distinct instance,sum(severity_minutes) as sev_sum 2 from history_view 3* where sev_sum > 30 SQL> / where sev_sum > 30 * ERROR at line 3: ORA-00904: invalid column name Any help is greatly appreciated, Kevin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists