   WHERE country = countrycode_id
    AND area = inAreaCode
    AND number = inNumber
+  LIMIT 1
  );
 END;
 $$ LANGUAGE plpgsql;

  AND agentString = inAgentString
  AND fromAddress = inIPAddress
  AND ((referring = referringURL) OR (referring IS NULL AND referringURL IS NULL))
 );

 IF existingSession IS NULL THEN

   SELECT id
   FROM Individual
   WHERE entity = entity_name_id
   LIMIT 1
  );
  IF individual_id IS NULL THEN
   INSERT INTO Individual (entity) VALUES (entity_name_id) RETURNING id INTO individual_id;
