<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Paul,<br>
      Try : GROUP BY biblionumber HAVING count(biblionumber)>1<br>
      That way, it will work even for biblios without ccode.<br>
      François<br>
      <br>
      <div class="moz-signature">
        <style type="text/css">
.moz-signature {
 color: #FFFFFF;
}
.sig_inlibro {
 padding-top : 2px;
 color: #888888;
 font-family : "Trebuchet MS", verdana;
 font-size: 90%;
}
.sig_content {
 border-top: 2px solid #DDDDDD;
 border-bottom: 2px solid #BFD13D;
 background-color : #F6F6F6;
 padding-left:10px;
}
.sig_inlibro a:visited, .sig_inlibro a:hover, .sig_inlibro a:link {
 text-decoration: none;
 color: #005B85;
}
.nom {
 color: #005B85;
 font-weight : bold;
}
.inlibro, .in {
 color: #BFD13D;
}
.libro {
 color: #005B85;
}
.in, .libro {
 font-size : 120%;
}
.desc {
    margin-bottom: 0;
    padding-bottom: 5px;
}
.small {
 font-size: 80%;
}
.tagline {
 color : #00BCE4;
}
.sig_footer {
 padding-left : 10px;
 background-color : #EEEFEA;
}
</style>
        <div class="sig_inlibro">
          <div class="sig_content"> <span class="nom">François
              Charbonnier,</span><br>
            <span class="tagline small">Chef de produits</span><br>
            <p class="desc small"> Tél.  : (888) 604-2627<br>
              <a href="mailto:francois.charbonnier@inLibro.com">francois.charbonnier@inLibro.com</a>
            </p>
          </div>
          <div class="sig_footer"> <span class="in">in</span><span
              class="libro">Libro</span> <span class="tagline small">|
              pour esprit libre |</span> <a class="small"
              href="http://www.inLibro.com">www.inLibro.com</a> </div>
        </div>
      </div>
      Le 2014-01-20 16:06, Paul A a écrit :<br>
    </div>
    <blockquote cite="mid:5.2.1.1.2.20140120155406.04c87a70@stormy.ca"
      type="cite">I'm going round in circles for what I thought would be
      easy, and will kick myself later.
      <br>
      <br>
      Trying to write a "report" that will give me all biblios with more
      than 1 item:
      <br>
      <br>
      SELECT
      <br>
      biblionumber, CONCAT('<a
      href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=',biblionumber,'\">',title,'</a>')
      AS Title, author AS Author
      <br>
      FROM biblio b
      <br>
      LEFT JOIN items i USING (biblionumber)
      <br>
      GROUP BY i.ccode
      <br>
      HAVING COUNT(i.itemnumber)>1;
      <br>
      <br>
      works syntactically, but certainly does not give me the right
      answers -- it produces biblios with 0, 1, 2, etc items, and only
      83 total lines when I know that there are thousands...
      <br>
      <br>
      Logic seems to have deserted me. Help please?
      <br>
      <br>
      As a bonus, I'd appreciate how to add the items.ccode into the
      report. Adding SELECT ccode FROM items either before or after the
      JOIN fails.
      <br>
      <br>
      Thanks and br -- Paul
      <br>
      <br>
      _______________________________________________
      <br>
      Koha-devel mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
      <br>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
      <br>
      website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
      <br>
      git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
      <br>
      bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a>
      <br>
    </blockquote>
    <br>
  </body>
</html>