Created
December 15, 2015 23:09
-
-
Save wlmcewen/dce5c9b20dfd3822ceb6 to your computer and use it in GitHub Desktop.
API-3622 brainstorming settings config for prospector.
This file contains 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
# maybe we can handle the cascade db side like so. | |
select idx(array[22740185, 19161654], notification_id), * from notification where notification_id in (19161654, 52740185) order by idx(array[52740185, 19161654], notification_id) nulls last; | |
# perhaps we cascade by throwing the contact, agent and mls in a subselect on this collection ordered smartly | |
prospector_alpha=# select subscriber_id, master_owner_id, r.mls_id from resource r inner join newsfeed f on r.resource_id = f.resource_id where r.resource_id = '20151215223132896052000000' and f.subscription_name in (select subscription_name from newsfeed f2 where subscriber_id in (f.subscriber_id,r.master_owner_id, f.mls_id) and subscription_name = 'Subscription kaplan search ash' limit 1); | |
subscriber_id | master_owner_id | mls_id | |
----------------------------+----------------------------+---------------------------- | |
20150320225609690019000000 | 20150320225609690019000000 | 20141203195816310156000000 | |
20151215222025934687000000 | 20150320225609690019000000 | 20141203195816310156000000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment