Module:Demographics

require "Module:Demographics Basics" require "Module:Demographics Database" local p = require('Module:Demographics/PopQuery')

function p.all(frame) if (frame.args[2] ~= nil) then local data = p.filterpops(frame.args[2], 0, 0, 0, 0, frame.args[1], 0, 0) local total = 0 for k,v in data do   		total = total + v['quantity'] end return total else local data = p.filterpops(0, 0, 0, 0, 0, frame.args[1], 0, 0) local total = 0 for k,v in data do   		total = total + v['quantity'] end return total end end

return p