Reworked the report queries for hibernate

NOTE: Tests are all passing, but getting complaints from
postgres when report is run on deployment