Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

MySQL question

by Kozz (Friar)
on Mar 28, 2002 at 21:35 UTC ( #155114=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    id | title | doc_num | version
    ---+-------+---------+--------
     1 |  bar  |  1234   |   1
     2 |  foo  |  1234   |   2
     3 |  baz  |  5678   |   1
    
  2. or download this
    SELECT title, doc_num, MAX(version) AS version ORDER BY title;
    which produces this:
    ...
    -------+---------+--------
      bar  |  1234   |   2
      baz  |  5678   |   1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://155114]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-12-25 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls