我正在使用我在本地安装并通过 python 访问的 musicbrainz.org postgresql 数据库。
如何创建一个 SQL 查询来输出发布组的所有轨道?我能够获得与特定乐队相关的正确艺术家信息和版本,但使用以下查询的版本的曲目是错误的:
strsql_band = "SELECT artist.id, artist.gid, artist.name, artist.comment FROM artist WHERE artist.name=%s AND type>1 ORDER BY type, artist.last_updated DESC"
strsql_memberid = "SELECT entity0, link.begin_date_year, link.end_date_year FROM l_artist_artist l JOIN link ON l.link=link.id WHERE entity1=%s AND link_type=103"
strsql_release = "SELECT id, release_group.name FROM release_group WHERE artist_credit=%s"
# This does not return the correct tracks for the release
strsql_track = "SELECT id, position, name, length FROM track WHERE artist_credit=%s LIMIT 15"
任何帮助将不胜感激,我已经为此努力了几个小时。