SELECT * FROM \"complex_idx_test\" WHERE \"sys_from\" <= 0 AND \"sys_to\" >= 0
UNION ALL
SELECT * FROM \"complex_idx_test\" WHERE \"sys_from\" <= 0
) AS \"t3\"
WHERE (\"identification_number\" = 1 OR (\"identification_number\" = 100 OR \"identification_number\" = 1000))
AND ((\"product_code\" = \"222\" OR \"product_code\" = \"111\") AND \"amount\" > 0)
";
letfirst_sub_query="SELECT * FROM \"complex_idx_test\" WHERE ((\"identification_number\" = 1 OR (\"identification_number\" = 100 OR \"identification_number\" = 1000)) AND ((\"product_code\" = \"222\" OR \"product_code\" = \"111\") AND \"amount\" > 0)) AND (\"sys_from\" <= 0 AND \"sys_to\" >= 0)".to_string();
letsecond_sub_query="SELECT * FROM \"complex_idx_test\" WHERE ((\"identification_number\" = 1 OR (\"identification_number\" = 100 OR \"identification_number\" = 1000)) AND ((\"product_code\" = \"222\" OR \"product_code\" = \"111\") AND \"amount\" > 0)) AND (\"sys_from\" <= 0)".to_string();