group BusinessOverdueStatus;

getOverdueStatusesForBundle(external_key) ::= <<
select
  external_key
, account_key
, status
, start_date
, end_date
from bos
where external_key = :external_key
order by start_date asc
;
>>

createOverdueStatus() ::= <<
insert into bos (
  external_key
, account_key
, status
, start_date
, end_date
) values (
  :external_key
, :account_key
, :status
, :start_date
, :end_date
);
>>

test() ::= <<
select 1 from bos;
>>
