You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will just post an example and if this looks like it could use improvement, I will file an issue correctly. If this is expected behavior, I saved a bit of time 😄
This is formatter output
SELECT
z.zoo_id,
z.log_date,
a.firstname,
a.lastname,
zb.break_start
FROM
zoo z
JOIN animals a ON z.animal_id = a.animal_id
AND z.zoo_id = 9
JOIN zoo_breaks zb ON z.zoo_id = zb.zoo_id
AND Date_trunc('minute', zb.break_start) - Date_trunc('minute', z.opening_time) < '2 hours'::interval
AND zb.automatic = TRUE
WHERE
z.log_date >= '2022-01-01'
ORDER BY
z.worker_id;
I would assume JOIN conditions are aligned and would like to see output:
SELECT
z.zoo_id,
z.log_date,
a.firstname,
a.lastname,
zb.break_start
FROM
zoo z
JOIN animals a ON z.animal_id = a.animal_id
AND z.zoo_id = 9
JOIN zoo_breaks zb ON z.zoo_id = zb.zoo_id
AND Date_trunc('minute', zb.break_start) - Date_trunc('minute', z.opening_time) < '2 hours'::interval
AND zb.automatic = TRUE
WHERE
z.log_date >= '2022-01-01'
ORDER BY
z.worker_id;
Best regards.
The text was updated successfully, but these errors were encountered:
Good day,
I will just post an example and if this looks like it could use improvement, I will file an issue correctly. If this is expected behavior, I saved a bit of time 😄
This is formatter output
I would assume JOIN conditions are aligned and would like to see output:
Best regards.
The text was updated successfully, but these errors were encountered: