elsenorjose
Technical User
This is a hard one to describe because you really have to see it but can a crosstab query be designed in such a way as to give me multiple aggregates under multiple column headers with multiple row headers? I have a table that contains data on online radio station activity by market, station, and also by the type of format 'plays' or 'streams' are delivered in:
tbl_Plays
market
station
bytes
sessions
duration
type
What I need to produce is a report has a layout something like this. (Please note that the metrics under each 'type' are sums of sessions, bytes, and duration).
Type1 Type2
market1 station 1 Plays MBytes TtlTime Plays MBytes TtlTime
market2 station 2 Plays MBytes TtlTime Plays MBytes TtlTime
...
First off, I don't even know if something like this is possible. Secondly, if it is, how would I write it using SQL? I'm not using PHP or any other front end. If anyone thinks they can help but would rather see the actual mock up of the report in Excel, I'd be glad to provide the spreadsheet via email. Thanks.
tbl_Plays
market
station
bytes
sessions
duration
type
What I need to produce is a report has a layout something like this. (Please note that the metrics under each 'type' are sums of sessions, bytes, and duration).
Type1 Type2
market1 station 1 Plays MBytes TtlTime Plays MBytes TtlTime
market2 station 2 Plays MBytes TtlTime Plays MBytes TtlTime
...
First off, I don't even know if something like this is possible. Secondly, if it is, how would I write it using SQL? I'm not using PHP or any other front end. If anyone thinks they can help but would rather see the actual mock up of the report in Excel, I'd be glad to provide the spreadsheet via email. Thanks.