$query =
"SELECT ad_crtv_id, goods_cd, goods_nm, goods_feature_nm, ".
" count(ad_send_job_id) AS clk_cnts, ".
" count(distinct send_member_id || 'a' || ad_crtv_id) AS clk_uniq_cnts, ".
" count(distinct send_member_id) AS clk_member_cnts ".
" FROM clk_log ".
" WHERE ad_send_job_id = :mail_send_job_id ".
" AND add_dt >= :sum_start_dt ".
" AND add_dt <= :sum_end_dt ".
" GROUP BY ad_crtv_id, goods_cd, goods_nm, goods_feature_nm ";
"SELECT ad_crtv_id, goods_cd, goods_nm, goods_feature_nm, ".
" count(ad_send_job_id) AS clk_cnts, ".
" count(distinct send_member_id || 'a' || ad_crtv_id) AS clk_uniq_cnts, ".
" count(distinct send_member_id) AS clk_member_cnts ".
" FROM clk_log ".
" WHERE ad_send_job_id = :mail_send_job_id ".
" AND add_dt >= :sum_start_dt ".
" AND add_dt <= :sum_end_dt ".
" GROUP BY ad_crtv_id, goods_cd, goods_nm, goods_feature_nm ";
中间的是逻辑或,因为有常量'a' 所以返回1 感觉没什么更多的意义了。
||
逻辑或。如果任何一个参数不是0并且不NULL,返回1。