Fixing formatting
This commit is contained in:
parent
f8b551a75c
commit
0536cfb0e2
1 changed files with 23 additions and 3 deletions
|
|
@ -166,7 +166,7 @@ select
|
|||
as host_resolution_amount_paid_per_created_booking,
|
||||
{{
|
||||
return_capped_value(
|
||||
"cast(host_resolutions.xero_host_resolution_payment_count as decimal) / created_bookings.created_bookings",
|
||||
"cast(host_resolutions.xero_host_resolution_payment_count as decimal)/ created_bookings.created_bookings",
|
||||
-1,
|
||||
1,
|
||||
)
|
||||
|
|
@ -233,7 +233,17 @@ select
|
|||
) as revenue_retained_in_gbp,
|
||||
{{
|
||||
return_capped_value(
|
||||
"nullif( coalesce(guest_payments.total_guest_payments_in_gbp, 0) + coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0), 0) / nullif( coalesce(guest_payments.total_guest_payments_in_gbp, 0) + coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0), 0)",
|
||||
"nullif(
|
||||
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0),
|
||||
0) /
|
||||
nullif(
|
||||
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0),
|
||||
0)",
|
||||
-1,
|
||||
1,
|
||||
)
|
||||
|
|
@ -251,7 +261,17 @@ select
|
|||
) as revenue_retained_post_resolutions_in_gbp,
|
||||
{{
|
||||
return_capped_value(
|
||||
"nullif( coalesce(guest_payments.total_guest_payments_in_gbp, 0) + coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0) + coalesce(host_resolutions.xero_host_resolution_amount_paid_in_gbp, 0), 0) / nullif(coalesce(guest_payments.total_guest_payments_in_gbp, 0) + coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0) + coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0), 0)",
|
||||
"nullif(
|
||||
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0)
|
||||
+ coalesce(host_resolutions.xero_host_resolution_amount_paid_in_gbp, 0),
|
||||
0) /
|
||||
nullif(coalesce(guest_payments.total_guest_payments_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0),
|
||||
0)",
|
||||
-1,
|
||||
1,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue