Fixes SQL
parent
8bbe4b6274
commit
06ffde67f4
|
@ -67,19 +67,43 @@ ORDER BY
|
||||||
'conferences_all_formatted' => "
|
'conferences_all_formatted' => "
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
c.jitsi_component,
|
c.jitsi_component,
|
||||||
(SELECT ce.time
|
(SELECT COALESCE
|
||||||
FROM conference_events ce
|
(
|
||||||
WHERE
|
(SELECT ce.time
|
||||||
ce.conference_id = c.conference_id
|
FROM conference_events ce
|
||||||
AND
|
WHERE
|
||||||
ce.conference_event = 'conference created')
|
ce.conference_id = c.conference_id
|
||||||
|
AND
|
||||||
|
ce.conference_event = 'conference created'
|
||||||
|
),
|
||||||
|
(SELECT ce.time
|
||||||
|
FROM conference_events ce
|
||||||
|
WHERE
|
||||||
|
ce.conference_id = c.conference_id
|
||||||
|
AND
|
||||||
|
ce.conference_event = 'bridge selected'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
AS start,
|
AS start,
|
||||||
(SELECT ce.time
|
(SELECT COALESCE
|
||||||
FROM conference_events ce
|
(
|
||||||
WHERE
|
(SELECT ce.time
|
||||||
ce.conference_id = c.conference_id
|
FROM conference_events ce
|
||||||
AND
|
WHERE
|
||||||
ce.conference_event = 'conference expired')
|
ce.conference_id = c.conference_id
|
||||||
|
AND
|
||||||
|
(ce.conference_event = 'conference expired' OR ce.conference_event = 'conference stopped')
|
||||||
|
),
|
||||||
|
(SELECT pe.time
|
||||||
|
FROM participant_events pe
|
||||||
|
WHERE
|
||||||
|
pe.event_param = c.conference_id
|
||||||
|
ORDER BY pe.time DESC
|
||||||
|
LIMIT 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
AS end,
|
AS end,
|
||||||
c.conference_id,
|
c.conference_id,
|
||||||
c.conference_name,
|
c.conference_name,
|
||||||
|
|
Loading…
Reference in New Issue