Not relevant? For all we know the database is a chemical-driven telepathic jellybase from the planet Zartog. "The three-headed jellybase developers never told me if their database architecture supports autojoins, with GROUP BY and HAVING clauses...."
...believe it or not there is a hint in there somewhere ;)
Update: Actually come to think of it, all you need is GROUP BY, + COUNT(*) - check out your database documentation (from whichever planet it comes ;))
More update: I am also influenced by the doubt as to whether DBI is artificially intelligent enough to insert the required clauses -- it might still query the database for all the rows that meet the where clause which might still be a query from hell at the database end, even though it might be constrained only to return 2 to the caller! Make sure you check the SQL generated by any Perl libraries you do try out.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.