Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code> SELECT DISTINCT tracklist FROM track t0 WHERE (SELECT COUNT(DISTINCT tracklist) FROM track t1 WHERE ( (t1.id='test1.id') OR (t1.id='test2.id') ...... OR (t1.id='testn.id') ) = 1); -- This is OK if you have the track ids for this query. -- If you do not then you need to replace each of the t1.id='testm.id' statements -- with: -- t1.recording='testm.recording' AND -- t1.tracklist='testm.tracklist' AND -- t1.position='testm.position' AND -- t1.name='testm.name' AND -- t1.artist_credit='testm.artist_credit' AND -- t1.length='testm.length' AND -- t1.edits_pending='testm.edits_pending' AND -- t1.last_updated='testm.last_updated' </code></pre> <p>As I may not have the syntax exactly correct, and have had no opportunity to test it, a written description of what I am trying to achieve is next:</p> <p>I build up a query returning the list of tracks that you have. Once I have built this query I am checking whether the tracklists for these tracks are all the same. If they are, ie there is only one tracklist in the query, then this is the tracklist you require. If there are no tracklists in the query, or there is more than one, then the set of tracks you have do not correspond to any single existing tracklist, so you need to create a new tracklist. This query does not deal with the actual creation, if it proves necessary. I am not sure how it will deal with degenerate cases - there are no tracks at all in the query; or there are no tracklists listed for any of the tracks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload