|
Re: ORA-00937: not a single-group group function [message #37579 is a reply to message #37573] |
Thu, 14 February 2002 13:30 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
The EXISTS clause is basically checking to see if the particular numero has an entry for closed. Since we are asking for NOT EXISTS, it will only include numeros that do not have a closed entry.
The null in the select statement is arbitrary - it could have been 1, 0, 'x', or any column(s) in the table. The column list is irrelevent - we just want to know if there is a row out there or not for that criteria (same numero and closed).
Since your closed entries are in the same table, we just reference the table again and give it a different alias.
Make sense?
|
|
|
|