Guest User

Untitled

a guest
May 27th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. User:
  2. leader_id
  3.  
  4. Transaction:
  5. to_id #=> 'All users with leader_id of 1'
  6. to_type #=> 'User'
  7. from_id #=> *
  8. from_type #=> 'Advertisement'
  9.  
  10. I need a way to COUNT(*) the Transactions with a to_id for a user that has a leader_id of 1 (or given number)
Add Comment
Please, Sign In to add comment