Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. SELECT
  2. maps.name as map, builds.name as build, SUM(votes.vote) AS votes
  3. FROM
  4. builds
  5. INNER JOIN
  6. maps ON maps.id = builds.map
  7. LEFT JOIN
  8. votes ON votes.fk_build = builds.id
  9. GROUP BY
  10. build
  11. ORDER BY
  12. map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement