BookNet Canada export: fix incorrect counts
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 13 Jan 2020 18:59:11 +0000 (13:59 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 13 Jan 2020 18:59:11 +0000 (13:59 -0500)
commit0f5c22b4156902ed25e50b4d9a127409974eabe1
treec40bd503a0320a509f9eba68c4c521f671496965
parent8f134f4b7941f301ee3eec3c55c60df07e9c9a01
BookNet Canada export: fix incorrect counts

Various "COUNT(foo.id)" needed to become "COUNT(DISTINCT foo.id)"
when gathering lending counts to avoid duplication of rows due
to the outer joins in the query.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
booknet/booknet_exporter.pl