chore(*.sql): use sql-formatter for sql formatting
This commit is contained in:
parent
753f3433ce
commit
a650f1d3e8
63 changed files with 4432 additions and 2358 deletions
|
@ -2,12 +2,22 @@ CREATE OR REPLACE VIEW optimized_concerts AS
|
|||
SELECT
|
||||
c.id,
|
||||
c.date,
|
||||
CASE WHEN c.artist IS NOT NULL THEN
|
||||
json_build_object('name', a.name_string, 'url', a.slug)
|
||||
ELSE
|
||||
json_build_object('name', c.artist_name_string, 'url', NULL)
|
||||
CASE
|
||||
WHEN c.artist IS NOT NULL THEN json_build_object('name', a.name_string, 'url', a.slug)
|
||||
ELSE json_build_object('name', c.artist_name_string, 'url', NULL)
|
||||
END AS artist,
|
||||
json_build_object('name', v.name, 'name_short', trim(split_part(v.name, ',', 1)), 'latitude', v.latitude, 'longitude', v.longitude, 'notes', v.notes) AS venue,
|
||||
json_build_object(
|
||||
'name',
|
||||
v.name,
|
||||
'name_short',
|
||||
trim(split_part(v.name, ',', 1)),
|
||||
'latitude',
|
||||
v.latitude,
|
||||
'longitude',
|
||||
v.longitude,
|
||||
'notes',
|
||||
v.notes
|
||||
) AS venue,
|
||||
c.notes AS concert_notes
|
||||
FROM
|
||||
concerts c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue