/*[sqlquery[*/ SELECT CAST(policy_amount.policy_amount_identifier as VARCHAR) as policy_amount_identifier,
CAST(policy_amount.policy_amount as INTEGER) as policy_amount,
CAST(policy_amount.amount_type_code as VARCHAR) as amount_type_code ,
case when policy_amount.amount_type_code = 'Year' then CAST(policy_amount.policy_amount/12 as VARCHAR) end as monthly_policy_amount,
CAST(policy_amount.policy_coverage_detail_identifier as VARCHAR) as policy_coverage_detail_identifier
FROM demo.acme.policy_amount
JOIN demo.acme.premium on policy_amount.policy_amount_identifier = premium.policy_amount_identifier
/*]sqlquery]*/