Revert "Fixed most queries in reports, changed database"

This reverts commit 42742f7357e8b0f558a8616cb8b55d33172e3e95.
Changes adjusted to database change

With the new addition to our database 'sessions' i changed my php
Revert "Changes adjusted to database change"

This reverts commit 0c8e369df3034e5eca6a999acefda54a826844bc.