/*This SQL script uses Demos.abs database. 
  Please open ...\AbsoluteDatabase\Demos\Data\DBDemos.abs database file.
  This sample illustrates use of subquery in where clause when result being evaluated is compared to a constant. This query shows all venues where only one event will occur.*/

select Venue
from venues v
where 1 = (select count(*) from events where VenueNo=v.VenueNo)