Welcome to the Oracle community forum and interact with 2 million technical staff to enter the default value selectnvl (max (t1.packagesize), 0) from (selectdecode (count (t. per_bus_code), 0, 1) per_bus_code, decode (count (t. buss_code), 0, 1) buss_code, decode (count (t. pe
Welcome to the Oracle community forum to interact with 2 million technical staff> enter the default select nvl (max (t1.packagesize), 0) When oracle statistics are not recorded) from (select decode (count (t. per_bus_code), 0, '1') per_bus_code, decode (count (t. buss_code), 0, '1') buss_code, decode (count (t. pe
Welcome to the Oracle community forum and interact with 2 million technical staff> enter
Write the default value when oracle statistics are not recorded
Select nvl (max (t1.packagesize), 0)
From (
Select decode (count (t. per_bus_code), 0, '1') per_bus_code, decode (count (t. buss_code), 0, '1') buss_code, decode (count (t. per_code), 0, '1') per_code
From t_tybook_back_pers_business t
Where t. per_code = 'ty-00000106'
And t. end_date> sysdate
And t. start_date <= sysdate) t
Left join t_tybook_before_business t1 on t. buss_code = t1.code
Group by t. per_code;