Importing mailbox leads now works
This commit is contained in:
@@ -33,6 +33,21 @@ select res.created_at, con.reservation_date, res.start_date, room.arrival_date,r
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
select hotel_id
|
||||
|
||||
from alpinebits.conversions as con
|
||||
join alpinebits.conversion_rooms as room on room.conversion_id = con.id
|
||||
join alpinebits.reservations as res on res.id = con.reservation_id
|
||||
|
||||
|
||||
|
||||
where con.reservation_id is not null and room.total_revenue is not null
|
||||
and res.start_date <= room.arrival_date + INTERVAL '7 days'
|
||||
order by reservation_date;
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
select round(sum(room.total_revenue::numeric)::numeric, 3), con.advertising_medium
|
||||
|
||||
|
||||
Reference in New Issue
Block a user