Skip to content

Instantly share code, notes, and snippets.

@nigelr
Created May 10, 2013 01:55
Show Gist options
  • Save nigelr/5551916 to your computer and use it in GitHub Desktop.
Save nigelr/5551916 to your computer and use it in GitHub Desktop.
special_report
def self.report
from_date = '20130401'
entities = Entity.unscoped.where('updated_at > ?', from_date).where('type in (?)', ['Contact', 'Deceased', 'Child']).where(culture_id: [Selection.culture_australian_aboriginal.id, Selection.culture_australian.id]).order(:site_id, :type)
p entities.length
media_items = MediaItem.unscoped.where('updated_at > ?', from_date)
p media_items.length
entities = Entity.unscoped.where('updated_at > ?', from_date).where('type in (?)', ['Contact', 'Deceased', 'Child']).where(referral_source_id: [Selection.referral_source_internet.id, Selection.referral_source_information_session.id]).order(:site_id, :type)
p entities.length
entities = Entity.unscoped.where('updated_at > ?', from_date).where('type in (?)', ['Contact', 'Deceased', 'Child']).where(relation_id: [Selection.relation_friend.id, Selection.relation_support_1.id]).order(:site_id, :type)
p entities.length
end
@nigelr
Copy link
Author

nigelr commented May 10, 2013

results
156
11
0
1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment