This shows you the differences between two versions of the page.
admin:features:segments:creating [2012/03/05 20:56] doc |
admin:features:segments:creating [2016/06/28 22:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOTOC~~ | ||
- | {{page>:top_add&nofooter&noeditbtn}} | ||
- | |||
- | ====== Administration: Omnidex Features ====== | ||
- | |||
- | ===== Omnidex Segments ===== | ||
- | |||
- | [[admin:features:segments:home|Overview]] | | ||
- | **[[admin:features:segments:creating|Creating Segments]]** | | ||
- | [[admin:features:segments:queries|Querying Segments]] | | ||
- | [[admin:features:segments:attaching|Attaching Segments]] |[[admin:features:segments:dropping|Dropping Segments]] | | ||
- | [[admin:features:segments:archiving|Archiving Segments]] | ||
- | ---- | ||
- | |||
- | ==== Creating Segments ==== | ||
- | |||
- | Segments are easily creating using the [[dev:sql:statements:create_segment:home|CREATE SEGMENT]] statement. The following example shows a series of segments being created in a multi-step query. | ||
- | |||
- | <code> | ||
- | > ; 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') | ||
- | >> with delete; | ||
- | 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') | ||
- | >> with delete; | ||
- | Segment PART_2 created with 27 rows | ||
- | |||
- | > ; Create segment for Individuals born since 1980; | ||
- | > create segment PART_3 | ||
- | >> as (select INDIVIDUALS.$UNIQUEKEY | ||
- | >> from INDIVIDUALS | ||
- | >> where BIRTHDATE >= 'January 1, 1980') | ||
- | >> with delete; | ||
- | Segment PART_3 created with 1,882 rows | ||
- | </code> | ||
- | |||
- | |||
- | ==== ==== | ||
- | **[[admin:features:segments:querying|Next]]** | ||
- | |||
- | |||
- | ====== Additional Resources ====== | ||
- | |||
- | See also: | ||
- | |||
- | {{page>:admin:features:see_also&nofooter&noeditbtn}} | ||
- | |||
- | {{page>:bottom_add&nofooter&noeditbtn}} |