chore(*.sql): use sql-formatter for sql formatting

This commit is contained in:
Cory Dransfeldt 2025-06-14 17:10:41 -07:00
parent 753f3433ce
commit a650f1d3e8
No known key found for this signature in database
63 changed files with 4432 additions and 2358 deletions

View file

@ -6,16 +6,23 @@ SELECT
ol.artist_url,
ARRAY_AGG(DISTINCT ol.genre_name) AS genres,
json_build_object(
'title', ol.artist_name,
'image', ol.artist_art,
'url', ol.artist_url,
'alt', CONCAT(COUNT(*), ' plays of ', ol.artist_name),
'subtext', CONCAT(COUNT(*), ' plays')
'title',
ol.artist_name,
'image',
ol.artist_art,
'url',
ol.artist_url,
'alt',
CONCAT(COUNT(*), ' plays of ', ol.artist_name),
'subtext',
CONCAT(COUNT(*), ' plays')
) AS grid,
json_build_object(
'open_graph_image',
CASE
WHEN ol.opengraph_image_artist IS NOT NULL AND ol.opengraph_image_artist != '' AND ol.opengraph_image_artist != '/' THEN ol.opengraph_image_artist
WHEN ol.opengraph_image_artist IS NOT NULL
AND ol.opengraph_image_artist != ''
AND ol.opengraph_image_artist != '/' THEN ol.opengraph_image_artist
ELSE NULL
END
) AS metadata