chore(*.sql): use sql-formatter for sql formatting
This commit is contained in:
parent
cf1ee4c97f
commit
1d7f13d1f5
63 changed files with 4432 additions and 2358 deletions
|
@ -13,11 +13,23 @@ SELECT
|
|||
ol.album_art,
|
||||
ol.artist_url,
|
||||
ol.genre_url,
|
||||
json_build_object('title', ol.track_name, 'subtext', ol.artist_name, 'alt', CONCAT(ol.track_name, ' by ', ol.artist_name), 'url', ol.artist_url, 'image', ol.album_art, 'played_at', ol.listened_at) AS chart
|
||||
json_build_object(
|
||||
'title',
|
||||
ol.track_name,
|
||||
'subtext',
|
||||
ol.artist_name,
|
||||
'alt',
|
||||
CONCAT(ol.track_name, ' by ', ol.artist_name),
|
||||
'url',
|
||||
ol.artist_url,
|
||||
'image',
|
||||
ol.album_art,
|
||||
'played_at',
|
||||
ol.listened_at
|
||||
) AS chart
|
||||
FROM
|
||||
optimized_listens ol
|
||||
WHERE
|
||||
TO_TIMESTAMP(ol.listened_at) >= NOW() - INTERVAL '7 days'
|
||||
ORDER BY
|
||||
TO_TIMESTAMP(ol.listened_at) DESC;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue