Modeling Opportunities with accounts


#1
explore: opportunities {
  join: accounts_opportunities {
    relationship: one_to_many #many accounts related to a single opportunity
    fields: [account_id, opportunity_id]
    sql_on: ${opportunities.id} = ${accounts_opportunities.opportunity_id} ;;
  }

  join: accounts {
    relationship: many_to_one
    sql_on:  ${accounts_opportunities.account_id} = ${accounts.id};;
  }
}