{"action":"created","issue":{"url":"https://api.github.com/repos/jsoares/ttrss-plugin-feedstatistics/issues/1","labels_url":"https://api.github.com/repos/jsoares/ttrss-plugin-feedstatistics/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jsoares/ttrss-plugin-feedstatistics/issues/1/comments","events_url":"https://api.github.com/repos/jsoares/ttrss-plugin-feedstatistics/issues/1/events","html_url":"https://github.com/jsoares/ttrss-plugin-feedstatistics/issues/1","id":109644895,"number":1,"title":"division by zero error","user":{"login":"mr-flibble","id":5197625,"avatar_url":"https://avatars.githubusercontent.com/u/5197625?v=3","gravatar_id":"","url":"https://api.github.com/users/mr-flibble","html_url":"https://github.com/mr-flibble","followers_url":"https://api.github.com/users/mr-flibble/followers","following_url":"https://api.github.com/users/mr-flibble/following{/other_user}","gists_url":"https://api.github.com/users/mr-flibble/gists{/gist_id}","starred_url":"https://api.github.com/users/mr-flibble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mr-flibble/subscriptions","organizations_url":"https://api.github.com/users/mr-flibble/orgs","repos_url":"https://api.github.com/users/mr-flibble/repos","events_url":"https://api.github.com/users/mr-flibble/events{/privacy}","received_events_url":"https://api.github.com/users/mr-flibble/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jsoares/ttrss-plugin-feedstatistics/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-03T20:53:37Z","updated_at":"2015-10-05T19:49:39Z","closed_at":"2015-10-05T19:38:48Z","body":"Hello, yesterday I noticed that Statistics are empty. The system log items are:\r\n\r\nError: E_USER_ERROR (256)\r\nFilename:classes/db/pgsql.php:46\r\n\r\nMessage: \r\nQuery SELECT ttrss_feeds.title as feed, ttrss_feed_categories.title as category, COUNT(ref_id) as items, COUNT(NULLIF(marked, false)) as starred, COUNT(NULLIF(published, false)) AS published, ROUND(CAST(COUNT(ref_id) AS DECIMAL)/0,2) as items_day FROM ttrss_feeds LEFT JOIN ttrss_user_entries ON ttrss_feeds.id = ttrss_user_entries.feed_id AND ttrss_user_entries.last_read &gt; '2015-10-03' LEFT JOIN ttrss_entries ON ttrss_user_entries.ref_id = ttrss_entries.id LEFT JOIN ttrss_feed_categories ON ttrss_feeds.cat_id = ttrss_feed_categories.id WHERE ttrss_feeds.owner_uid = 2 GROUP BY feed, category ORDER BY items_day DESC failed: ERROR: division by zero\r\n\r\nAnd second error:\r\n\r\nError: E_WARNING (2)\r\nFilename:classes/db/pgsql.php:38\t\r\n\r\nMessage: \r\npg_query(): Query failed: ERROR: division by zero\r\n\r\nCan you think of where there may be a problem please? Thank you.\r\n"},"comment":{"url":"https://api.github.com/repos/jsoares/ttrss-plugin-feedstatistics/issues/comments/145647925","html_url":"https://github.com/jsoares/ttrss-plugin-feedstatistics/issues/1#issuecomment-145647925","issue_url":"https://api.github.com/repos/jsoares/ttrss-plugin-feedstatistics/issues/1","id":145647925,"user":{"login":"mr-flibble","id":5197625,"avatar_url":"https://avatars.githubusercontent.com/u/5197625?v=3","gravatar_id":"","url":"https://api.github.com/users/mr-flibble","html_url":"https://github.com/mr-flibble","followers_url":"https://api.github.com/users/mr-flibble/followers","following_url":"https://api.github.com/users/mr-flibble/following{/other_user}","gists_url":"https://api.github.com/users/mr-flibble/gists{/gist_id}","starred_url":"https://api.github.com/users/mr-flibble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mr-flibble/subscriptions","organizations_url":"https://api.github.com/users/mr-flibble/orgs","repos_url":"https://api.github.com/users/mr-flibble/repos","events_url":"https://api.github.com/users/mr-flibble/events{/privacy}","received_events_url":"https://api.github.com/users/mr-flibble/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T19:49:39Z","updated_at":"2015-10-05T19:49:39Z","body":"Thank you, you are the best :-)  Really.\r\nProblem solved\r\n\r\nPS: sorry for the spam, but I really felt the need to thank you."}}