text: ﻿CREATE FUNCTION [dbo].[fnGetTwitterProfilesWithVenture]
  (
  	@twitterUserNetwork nvarchar(100)
  )
  RETURNS TABLE
  AS
  RETURN
  (
  	SELECT TA.*, 
  	[dbo].fnGetTwitterAccountUrlByUserName(Username) as TwitterProfileUrl
  	FROM TwitterAccount TA WITH (NOLOCK)
  	WHERE CONTAINS(TA.ProfileDescription, '"VENTURE"')
  	AND TA.TwitterAccountsId IN 
  		(
  			SELECT * FROM [dbo].[fnGetTwitterFirstLevelFollowersIds] (@twitterUserNetwork) as FollowersId
  			UNION
  			SELECT * FROM [dbo].[fnGetTwitterSecondLevelFollowersIds] (@twitterUserNetwork) as FollowersId
  		)
  )
  