The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_view_by_select VARCHAR2(32000);
,p_view_by_select => l_view_by_select
,p_view_by => l_dummy);
l_sqltext := ' SELECT name VIEWBY,
-- SUM(p_talk)/DECODE(SUM(p_hand),0,null,SUM(p_hand)) BIX_PMV_AI_PREVAVGTALK,
SUM(curr_talk)/DECODE(SUM(curr_hand),0,null,SUM(curr_hand)) BIX_PMV_AI_AVGTALK ,
-- SUM(p_wrap)/DECODE(SUM(p_hand),0,null,SUM(p_hand)) BIX_PMV_AI_PREVAVGWRAP,
SUM(curr_wrap)/DECODE(SUM(curr_hand),0,null,SUM(curr_hand)) BIX_PMV_AI_AVGWRAP
FROM '||'(SELECT iset.*,cal.start_date st_date,cal.name
FROM '||bix_pmv_dbi_utl_pkg.trend_sql
(p_xtd => l_xtd,
p_comparison_type => l_comp_type,
p_fact_name => l_mv,
p_where_clause => l_where_clause,
p_col_name => bix_col_tab,
p_use_grpid => 'N',
p_in_join_tables => NULL,
p_fact_hint => NULL,
p_union_clause =>l_union_all_text )||'
) GROUP BY name ,st_date order by st_date ';