SELECT artist.artist_id
, artist.role_id
, artist.artist_name
FROM artist
WHERE artist.display
ORDER BY"replace"
(artist.artist_name
,','::text
,'0'::text
);
SELECT composer.composer_id
, composer.composer_name
FROM composer
WHERE composer.display
ORDER BY"replace"
(composer.composer_name
,','::text
,'0'::text
);
SELECT DISTINCT indistinct_composer_view.composer_id
, indistinct_composer_view.composer_name
FROM indistinct_composer_view
ORDER BY indistinct_composer_view.composer_id
, indistinct_composer_view.composer_name;
SELECT r.werk_id
, d.disc_id
, r.description
, l.label_name
, d.catalog_no
FROM disc d
, recording r
, label l
WHERE (
(l.label_id = d.label_id)
AND (r.disc_id = d.disc_id)
)
ORDER BY r.description
, l.label_name
, d.catalog_no;
SELECT r.werk_id
, r.recording_id
, r.description
, l.label_name
, d.catalog_no
FROM recording r
, disc d
, label l
WHERE (
(l.label_id = d.label_id)
AND (r.disc_id = d.disc_id)
)
ORDER BY r.description
, l.label_name
, d.catalog_no;
SELECT f.disc_id
, CASE WHEN
(
(
SELECT (
(split_part
(a.artist_name
,','::text
, 1
) ||
', '::text
) || rl.role_name
)
FROM role rl
, artist a
, performance p
WHERE (
(
(rl.role_id = a.role_id)
AND (a.artist_id = p.artist_id)
)
AND (p.performance_id = f.performance_id)
)
) IS NOT NULL
) THEN
(
SELECT (
(split_part
(a.artist_name
,','::text
, 1
) ||
', '::text
) || rl.role_name
)
FROM role rl
, artist a
, performance p
WHERE (
(
(rl.role_id = a.role_id)
AND (a.artist_id = p.artist_id)
)
AND (p.performance_id = f.performance_id)
)
) WHEN
(
(
SELECT (
(split_part
(c.composer_name
,','::text
, 1
) || ': '::text
) || w.title
)
FROM composer c
, werk w
, recording r
WHERE (
(
(c.composer_id = w.composer_id)
AND (w.werk_id = r.werk_id)
)
AND (r.recording_id = f.recording_id)
)
) IS NOT NULL
) THEN
(
SELECT (
(split_part
(c.composer_name
,','::text
, 1
) || ': '::text
) || w.title
)
FROM composer c
, werk w
, recording r
WHERE (
(
(c.composer_id = w.composer_id)
AND (w.werk_id = r.werk_id)
)
AND (r.recording_id = f.recording_id)
)
) ELSE NULL::text END AS description
FROM file_under f;
SELECT c.composer_name
, w.title
, r.description
, l.label_name
, d.catalog_no
FROM (
(
(
(recording r
JOIN werk w
USING (werk_id)
)
JOIN composer c
USING (composer_id)
)
JOIN disc d
USING (disc_id)
)
JOIN label l
USING (label_id)
)
ORDER BY c.composer_name
, w.title
, r.description
, l.label_name
, d.catalog_no;
SELECT a.role_id
, a.artist_id
, a.artist_name
FROM artist a
, recording r
, performance p
WHERE (
(a.artist_id = p.artist_id)
AND (p.recording_id = r.recording_id)
)
ORDER BY"replace"
(a.artist_name
,','::text
,'0'::text
);
SELECT c.composer_id
, c.composer_name
FROM composer c
, werk w
, recording r
WHERE (
(c.composer_id = w.composer_id)
AND (w.werk_id = r.werk_id)
)
ORDER BY"replace"
(c.composer_name
,','::text
,'0'::text
);
SELECT w.composer_id
, r.werk_id
, w.title
FROM werk w
, disc d
, recording r
WHERE (r.werk_id = w.werk_id)
ORDER BY"replace"
(w.title
,' '::text
,'0'::text
);
SELECT p.performance_id
, p.recording_id
, a.artist_name
, r.role_name
FROM (
(performance p
JOIN artist a
USING (artist_id)
)
JOIN role r
USING (role_id)
)
ORDER BY a.artist_name
, r.role_name;
SELECT DISTINCT w.werk_id
, p.artist_id
, c.composer_name
, w.title
FROM werk w
, composer c
, recording r
, performance p
WHERE (
(
(p.recording_id = r.recording_id)
AND (w.werk_id = r.werk_id)
)
AND (c.composer_id = w.composer_id)
)
ORDER BY w.werk_id
, p.artist_id
, c.composer_name
, w.title;
SELECT ri.recording_info_id
, ri.recording_id
, ri.recording_date
, ri.duration
, (
SELECT v.venue_name
FROM venue v
WHERE (ri.venue_id = v.venue_id)
) AS venue_name
, (
SELECT t.tonmeister_name
FROM tonmeister t
WHERE (ri.tonmeister_id = t.tonmeister_id)
) AS tonmeister_name
, (
SELECT p.producer_name
FROM producer p
WHERE (ri.producer_id = p.producer_id)
) AS producer_name
, (
SELECT tg.transfer_guy_name
FROM transfer_guy tg
WHERE (ri.transfer_guy_id = tg.transfer_guy_id)
) AS transfer_guy_name
, (
SELECT s.spars_name
FROM spars s
WHERE (ri.spars_id = s.spars_id)
) AS spars_name
, ri.channels
, ri.rating
, ri.original_issue
, ri.comments
FROM recording_info ri;
SELECT r.recording_id
, r.disc_id
, c.composer_name
, w.title
, r.description
FROM (
(recording r
JOIN werk w
USING (werk_id)
)
JOIN composer c
USING (composer_id)
)
ORDER BY"replace"
(c.composer_name
,','::text
,'0'::text
)
,"replace"
(w.title
,' '::text
,'0'::text
)
, r.description;
SELECT DISTINCT rl.role_id
, rl.role_name
FROM role rl
, artist a
, performance p
WHERE (
(rl.role_id = a.role_id)
AND (a.artist_id = p.artist_id)
)
ORDER BY rl.role_name
, rl.role_id;
SELECT w.werk_info_id
, w.werk_id
, w.subtitle
, w.werk_no
, (
SELECT m.key_name
FROM musical_key m
WHERE (m.musical_key_id = w.musical_key_id)
) AS key_name
, (
SELECT g.genre_name
FROM genre g
WHERE (g.genre_id = w.genre_id)
) AS genre_name
FROM werk_info w;
SELECT werk.werk_id
, werk.composer_id
, werk.title
, werk.display
FROM werk
ORDER BY werk.display DESC
,"replace"
(werk.title
,' '::text
,'0'::text
);