beowulf1416

Untitled

Feb 4th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. select
  2. a.gateway_id,
  3. b.title,
  4. c.title,
  5. sum(a.total_minutes)
  6. from report_total_minutes_by_day a
  7. inner join data_gateway b on a.gateway_id = b.id
  8. inner join data_group_rca c on b.rca_id = c.id
  9. where b.is_deleted = 0
  10. and c.is_deleted = 0
  11. and a.report_date = current_date
  12. group by a.gateway_id
Advertisement
Add Comment
Please, Sign In to add comment