It has been quite some time since I have had to code anything, and I am at a complete loss of where to start. I do have notes from long ago about making a connection to my database. But past that I just don't know where to begin or how to approach this problem.
I need to produce a report based on data in a table on a SQL database. Please note this database is very old and only supports the most rudimentary of SQL statements. That is why I am trying to find a perl solution.
The database name is callc, the table name is call_history. The call_history table contains the following fields
name = 4 digit numerical number unique to each person
call_duration = the call length in seconds
call_type = I or O
I need to produce the following output:
[tt]
Name Total Inbound Total Outbound Total Handled Average Call Length
1431 205 173 378 2:31
2432 192 301 493 2:03
[/tt]
The definitions of the report headings are as follows:
Name = self explanatory
Total Inbound = total number of records where call type is an "I" for that specific name
Total Outbound = total number of records where call type is an "O" for that specific name
Total Handled = the total of Inbound and Outbound for that specific name
Average Call Length = Total Number of calls divided by the total of call_duration (In Minutes) for that specific name
Thank you for putting up with an old man. By no means do I expect someone to code for me, but a slight smack in the face to point me in the right direction is always appreciated.
FL
I need to produce a report based on data in a table on a SQL database. Please note this database is very old and only supports the most rudimentary of SQL statements. That is why I am trying to find a perl solution.
The database name is callc, the table name is call_history. The call_history table contains the following fields
name = 4 digit numerical number unique to each person
call_duration = the call length in seconds
call_type = I or O
I need to produce the following output:
[tt]
Name Total Inbound Total Outbound Total Handled Average Call Length
1431 205 173 378 2:31
2432 192 301 493 2:03
[/tt]
The definitions of the report headings are as follows:
Name = self explanatory
Total Inbound = total number of records where call type is an "I" for that specific name
Total Outbound = total number of records where call type is an "O" for that specific name
Total Handled = the total of Inbound and Outbound for that specific name
Average Call Length = Total Number of calls divided by the total of call_duration (In Minutes) for that specific name
Thank you for putting up with an old man. By no means do I expect someone to code for me, but a slight smack in the face to point me in the right direction is always appreciated.
FL