when I use with customfiled only few of the issues are missing
Worklogs are not stored in customfield, and nor is much of the sprint data.
I would very strongly recommend that you stop reading the database, it's the worst way of asking Jira for any form of report - it's not designed for it, your SQL rapidly becomes a nightmare, and unless you have a comprehensive understanding of the data structures, you are going to get it wrong.
Could you explain what you are actually trying to report on? (Not the raw data, but what question would your report answer?)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.