api.stats_moorages_away_view
Description
Statistics Moorages Time Spent Away web view
Table Definition
CREATE VIEW stats_moorages_away_view AS (
SELECT sa.description,
sum(m.stays_sum_duration) AS time_spent_away_by
FROM api.moorage_view m,
api.stays_at sa
WHERE ((m.home IS FALSE) AND (m.default_stay_id = sa.stay_code))
GROUP BY m.default_stay_id, sa.description
ORDER BY m.default_stay_id
)
Columns
| Name | Type | Default | Nullable |
|---|---|---|---|
| description | text | true | |
| time_spent_away_by | interval | true |
Referenced Tables
| Name | Columns | Comment | Type |
|---|---|---|---|
| api.moorage_view | 18 | Moorage details web view | VIEW |
Relations
erDiagram
"api.stats_moorages_away_view" {
text description ""
interval time_spent_away_by ""
}
Generated by tbls