CDR Reporting - view as in FreePBX (one call one line)

Hy everyone,
I found no topic regard my question, so I create this one.

My System:
Asterisk Version: 11.17

I’m currently working on a report.
I Connected Our SQL Server With the Asterisk CDR Table (linked server)
But it is not so easy for me to create a clean report.
I want to have a Query that looks like as the overview in the CDR Reports on the webinteface:
CallDate,System,CallerID,OutboundCallerID,App,Destination,Disposition,Duration. etc
In the datebase every Call has many lines and I don’t know how I could match it to one line.

Does anyone have a Query for that or another good solution?

Ok looks like not many are using the CDR database.
But how could I create a phone statistic?
Is no one using Asterisk/FreePBX for analyzing (as example quantity duration…) and export to SQL?

Could any one help?

We use a simple cgi perl script to access the CDR. Its nothing special.
You should use your scripting language of choice, and pass some SQL query/ies to your CDR database.

Yes, no one is doing that, as that is not what Asterisk is there for.

Since the data is stored either in a Database or a CSV file (depending on how your system is configured), using Asterisk to do any of that seems like a huge steps in the wrong direction.

Thanks guys, if I have an idea or a solution I will let you know.