Segments are easily creating using the CREATE SEGMENT statement. The following example shows a series of segments being created in a multi-step query.
> ; Create a segment for Individuals in Denver, CO > create segment PART_1 >> as (select INDIVIDUALS.$UNIQUEKEY >> from INDIVIDUALS >> join HOUSEHOLDS on INDIVIDUALS.HOUSEHOLD = HOUSEHOLDS.HOUSEHOLD >> where STATE = 'CO' and >> CITY = 'Denver'); Segment PART_1 created with 37 rows > ; Create segment for Individuals in Phoenix, AZ; -> create segment PART_2 >> as (select INDIVIDUALS.$UNIQUEKEY >> from INDIVIDUALS >> join HOUSEHOLDS on INDIVIDUALS.HOUSEHOLD = HOUSEHOLDS.HOUSEHOLD >> where STATE = 'AZ' and >> CITY = 'Phoenix'); Segment PART_2 created with 27 rows > ; Create segment for Individuals born since 1990; > create segment PART_3 >> as (select INDIVIDUALS.$UNIQUEKEY >> from INDIVIDUALS >> where BIRTHDATE >= 'January 1, 1990'); Segment PART_3 created with 1,198 rows
See also: