Created
April 12, 2012 17:37
-
-
Save spmallette/2369515 to your computer and use it in GitHub Desktop.
Custom Bound Score Attribute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set identity_insert score_attribute on | |
insert into score_attribute(score_attribute_id, roi_campaign_id, score_attribute_name, score_attribute_description, | |
score_attribute_key, score_attribute_command, score_attribute_binding) | |
values (10, null, 'Articles Published Custom', 'bah', 'articlesPublishedCustomBound', 'SELECT drmi.provider_id, COUNT(DISTINCT drmi.media_item_id) AS ct FROM media_item AS mi JOIN provider_media_item AS drmi ON (drmi.media_item_id = drmi.media_item_id) JOIN provider AS dr ON (dr.provider_id = drmi.provider_id) JOIN roi_campaign_project AS rcp ON (rcp.project_id = dr.project_id) WHERE rcp.roi_campaign_id = :roiCampaignId AND mi.media_item_sort_date < :hx GROUP BY drmi.provider_id', 'stat_custom_1') | |
set identity_insert score_attribute off | |
go | |
insert into score_score_attribute | |
values (1, 10) | |
go | |
insert into roi_campaign_score_weight | |
values (1, 10, 0.0) | |
go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment