Multiple many-to-many JOINs in a single mysql query without Cartesian Product -


Currently, I can get results with two different SELECT statements

  SELECT from: COUNT (rl.refBiblioID) selection bl.biblioID by biblioList BL Left group_concat ( ', al.lastName, al.firstName) order CONCAT_WS (by al.authorID) include bl.biblioID = rl.biblioID group refList rl When biblioList BL left al.authorID = ba.authorID include Group ba.biblioID = bl.biblioID on biblio_author which AuthorList Al Ba JOIN   

combining them in this way, however,

  select group_concat (CONCAT_WS (':', al.lastName, al.firstNa Me) order by al.authorID), COUNT (rl.refBiblioID) biblioList BL from left to biblio_author ba.biblioID = Join B on the BL To  

Duplicate name author results column Join Join al.authorID = ba.authorID AuthorList al biblioID Left refList rl by bl.biblioID = rl.biblioID Group bl.biblioID Causes for How do I get the desired results from a SELECT statement without using DISTINCT? Along with alcohol?

If subdivision is acceptable, then I believe that you can do this by doing something like this:

  (on selected y.authors, COUNT (rl.refBiblioID) bl.biblioId, group_concat (CONCAT_WS ( ':', al.lastName, al.firstName) by al.authorID order) as well as biblioList BL left writers bl.biblioID by al.authorID = ba.authorID Group ba.biblioID = bl.biblioID on biblio_author which AuthorList Al Ba Join) Y lEFT JOIN on refList rl (y.biblioID = Rl.biblioID) group  

another solution DISTINCT to your G ROUP_CONCAT , but it was not what you wanted?

  GROUP_CONCAT (DISTINCT (CONCAT_WS (':', al.lastName, al.firstName) by al.uthor)),  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -