Map report labels to database columns
A user sent me a CSV they had downloaded from my APEX application and then subsequently updated. I needed to know which database column was the source for each column in the spreadsheet; this was not as simple as you might think because the labels from this report (that has a bewilderingly large number of columns) were quite often very different from the database column name.
To map their spreadsheet columns to database columns I used this simple query:
select x.interactive_report_id, x.report_label, x.column_alias from apex_application_page_ir_col x where x.application_id = <my app id> and x.page_id = <my page id> order by x.interactive_report_id, x.report_label;