Recipes

Recreating monta_roaming_role in charges table

Recreate the missing monta_roaming_role column of the charges table with a query on charges and charging stations.


sql
select case when charges.is_roaming_charge and charge_points.is_monta_charge_point then 'CPO' when charges.is_roaming_charge and not charge_points.is_monta_charge_point then 'EMP' end as monta_roaming_role from {{ charges_table }} as charges left join {{ charge_points }} as charge_points on charges.charge_point_id = charge_points.cp_id

charges.monta_roaming_role

In the new charges table monta_roaming_role column is missing. This column can be recreated the following way.

Last modified on

Did this page help you?