mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01:00
Database: Add query to get composers of work
This commit is contained in:
parent
b414655a56
commit
6cc110c76c
1 changed files with 5 additions and 0 deletions
|
|
@ -68,6 +68,11 @@ SELECT * FROM works WHERE part_of = :id ORDER BY part_index;
|
||||||
-- SELECT DISTINCT A.* FROM works A, works B ON A.id = B.part_of
|
-- SELECT DISTINCT A.* FROM works A, works B ON A.id = B.part_of
|
||||||
-- WHERE A.composer = :id OR B.composer = :id;
|
-- WHERE A.composer = :id OR B.composer = :id;
|
||||||
|
|
||||||
|
composersByWork:
|
||||||
|
SELECT DISTINCT persons.* FROM persons
|
||||||
|
JOIN works ON works.composer = persons.id
|
||||||
|
WHERE works.id = :id OR works.part_of = :id;
|
||||||
|
|
||||||
instrumentsByWork:
|
instrumentsByWork:
|
||||||
SELECT instruments.* FROM instrumentations
|
SELECT instruments.* FROM instrumentations
|
||||||
JOIN instruments ON instrumentations.instrument=instruments.id
|
JOIN instruments ON instrumentations.instrument=instruments.id
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue