Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. select
  2. *
  3. from
  4. (select
  5. vot_procodigoprovincia as provincia,
  6. vot_depcodigodepartamento as departamento,
  7. vot_mescodigocircuito as circuito,
  8. vot_mescodigomesa as mesa,
  9. votvotospartido as votos_fpv
  10. from mesascandidaturapresidente
  11. where vot_parcodigo = '0131') a
  12. join (select
  13. vot_procodigoprovincia as provincia,
  14. vot_depcodigodepartamento as departamento,
  15. vot_mescodigocircuito as circuito,
  16. vot_mescodigomesa as mesa,
  17. votvotospartido as votos_pro
  18. from mesascandidaturapresidente
  19. where vot_parcodigo = '0135') b
  20. using (provincia, departamento, circuito, mesa)
  21. where
  22. -- votos_fpv < (votos_pro/10) -- 72 mesas
  23. -- votos_pro < (votos_fpv/10) -- 279 mesas
  24. (votos_fpv > 0 and votos_pro = 0) -- 21 mesas
  25. or (votos_pro > 0 and votos_fpv = 0) -- 37 mesas
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement