Category Archives: Work

One-to-one SQL join from among the many?

I have two tables in MySQL. One of them (let’s say, for the purpose of simplicity) is a listing of books. The other is a listing of reviews of those books along with a 1-5 ranking. Each book may have 0 or more reviews. It’s your standard one-to-many relationship.

However, I want to have a one-to-one left join in order to generate a listing of books along with their most recent ranking, like such:

Da Vinci Code: 1
The Omnivore’s Dilemma: 5
The Half-Blood Prince: N/A
Freakonomics: 3
Cesar’s Way: 3

Again, this is not the average ranking, simply the one accompanying the most recent review, assuming there is one.

Here’s the question: What’s the simplest method of joining the two tables to include only the ranking from that most recent review? I just know I’m overlooking something simple.

VQR press coverage.

I’ve enjoyed following all of the coverage of the big wins chalked up by Virginia Quarterly Review (my employer) at Tuesday night’s National Magazine Awards. These are some of the highlights.

Advertising Age:

The Cinderella story of the evening was The Virginia Quarterly Review, which won both for general excellence and for fiction. Editor Ted Genoways told the crowd of his first trip to New York City, to accept an award for best high-school magazine, during which he and his fellow high schoolers “crammed into Roger Angell’s office at the New Yorker and visited Spy‘s offices in the Puck Building.”

The Associated Press:

Harper’s, New York magazine and the New Yorker each won two National Magazine Awards, the highest accolade in the magazine industry. Time and Rolling Stone were also two-time winners Tuesday.
But perhaps the biggest coup was scored by the Virginia Quarterly Review, a small-circulation literary journal that also won two awards but was nominated for six, even more than the other top-winning magazines.

In addition to the fiction award, the Virginia Quarterly Review, which is based at the University of Virginia, also won for general excellence in its circulation category of under 100,000.

In their citation, the judges said the magazine “reimagines and re-energizes that old-world form — the literary journal,” even as magazines rush to adapt to the Internet. “VQR sets the bar extremely high — and clears it time and again.”

The Washington Post:

No magazine dominated the competition at the National Magazine Awards in New York last night, but VQR — the tiny, obscure Virginia Quarterly Review — came pretty close.


Since taking over the magazine three years ago, Genoways has used eye-popping graphics, colorful photographs and comics to enliven a staid literary journal founded in 1925.

And Media Life Magazine:

It’s usually the bigger magazines like The New Yorker or Atlantic Monthly taking home multiple National Magazine Awards. But ever so often a small one pops up with a big night that surprises everyone, and last night that was the Virginia Quarterly Review.


The [Fiction] category was a bit of an upset. The Virginia Quarterly edged the Atlantic, which was nominated for eight total awards, more than any other publication, but won zero.


The magazine, a publication of the University of Virginia, is based in Charlottesville, Va. It was founded in 1925, and since then has published such well-known writers as H.L. Mencken, Thomas Wolfe, Eleanor Roosevelt and Robert Frost.

It carries only about three pages of advertising per issue and maintains a tiny staff that was pretty excited about last month’s nominations.

Here’s hoping that this is the beginning of something big, rather than the something big itself.

VQR takes home a pair of Ellies.

My employer, Virginia Quarterly Review, has won big at tonight’s National Magazine Awards. VQR pulled off the noteworthy feat of winning two awards, including The Big One: General Excellence. Ted Genoways did some fine speaking up on the stage at Lincoln Center this evening, making up for the interminably long walk from his seat in the second-to-last row of the joint.

(I have nothing at all to do with these awards, and deserve no credit whatsoever for VQR‘s win, but I’m basking in it just the same.)

The three pieces that added up to the win in the Fiction category are available on the website: Alan Heathcock’s “Peacekeeper,” Joyce Carol Oates’ “Smother,” and R.T. Smith’s “Ina Grove.” It must be noted that Smith is a Virginian—he lives in Rockbridge, and edits Shenandoah: The Washington and Lee University Review. Congratulations to them all.

VQR’s curious stats.

Using Mint, I keep a close eye on the traffic on my various websites. Out of an interest in open source software, I’ve watched Firefox’s market share creep up on my various websites in the past few months. At, the browser shares pretty much represent what I think is true nationally — 72% Internet Explorer, 22% Firefox, and 4% Safari. On this site it’s at 56% Internet Explorer, 33% Firefox, and 6% Safari.

Screen Shot On Virginia Quarterly Review, Firefox is at 48%, Safari is at 23%, and Internet Explorer is third, at 22%.

Up is down. Black is white. Dewey defeats Truman.

For months Firefox has been running close to IE on the site, and Safari has been creeping up. Since the NMA nominations were announced six days ago, though, traffic has spiked tremendously, with all of that traffic representing new visitors.

I must say that I’m fond of this new demographic — a bunch of Mac-owning open source software users. God bless ’em.

VQR: Six National Magazine Awards nominations.

Virginia Quarterly Review, my employer, has big news on the blog today:

Wow! Everyone in our office has been trying not to hyperventilate. The finalists for the 2006 National Magazine Awards (the magazine world’s equivalent to the Pulitzers or the National Book Awards) were announced today and VQR garnered six nominations! Pretty unheard of for a magazine our size. The Atlantic Monthly led all magazines with eight nominations, then came us, followed by GQ, Harper’s, National Geographic, New York, and The New Yorker with five nominations each. Pretty heady company. We received a nomination in the General Excellence category for magazines with circulations under 100,000 (which we fit well under). Also nominated in this category were Aperture, The Believer, Legal Affairs, and ReadyMade.

All of the nominated pieces are available on the website. I particularly recommend Pauline Chen’s “Dead Enough?: The Paradox of Brain Death” and Martin Preib’s “The Wagon,” both non-fiction pieces. Preib’s nomination is particularly great because he’s a cop — “The Wagon” is the first piece that he’s had in a national publication. How wonderful for him that it would be nominated for a National Magazine Award.

For what it’s worth, I have nothing to do with these nominations. Not only does my work as Internet Evangelist have nothing to do with the writing, but I just started in October, at the tail end of the period under consideration. While I’m proud to be affiliated with such a great publication, I deserve credit only for having good taste in employers.

“The Old Man and the Sea,” a distinctly minor work.

I’m working on rather a large project for Virginia Quarterly Review that entails looking through many of the issues produced in the publication’s eighty-year history. I must admit that I sometimes become distracted by the contents of the articles themselves, which often are not just interesting on their own, but doubly so in the context of modern times.

My favorite recent read has been John Aldridge’s “About Ernest Hemingway,” from the Spring 1953 VQR. It’s a ten page review of Hemingway’s “The Old Man and the Sea,” a book that is, of course, regarded as one of the great triumphs of the English language; famously, it earned Hemingway the 1954 Nobel Prize in Literature. Here’s the opening paragraph, emphasis mine:

I confess that I am unable to share in the prevailing wild enthusiasm for this new book of Hemingway’s, “The Old Man and the Sea.” It is of course a remarkable advance over his last nove; and it has a purity of line and a benignity, a downright saintliness, of tone which would seem to indicate not merely that he has sloughed off his former emotional fattiness but that he has expanded and deepened his spiritual perspective in a way that must strike us as extraordinary. But one must take care not to push these generosities too far, if only because they spill over so easily into that excess of blind charity we all tend to feel for Hemingway each time he pulls out of another slump and attains to the heroism of simply writing well once again. It should be possible for us to honor him for his amazing recuperative powers and his new talent for quasi-religious revelation and still be able to see that it is not for either of these qualities that his book must finally be valued, but for the degree of its success in meeting the standards set down by his own best previous achievement as an artist. I have these standards in mind when I say that “The Old Man and the Sea” seems to me a work of distinctly minor Hemingway fiction.

The good news is that the book only set Mr. Aldridge back $3.

VQR blog.

At The Virginia Quarterly Review, we’ve just launched my first publicly-visible contribution to the venerable publication’s internet presence: The Virginia Quarterly Review Blog. There are very few literature blogs out there, with the best (IMHO) being Bookslut, followed by GalleyCat and then a bunch of others. (I haven’t yet adjusted to MobyLives‘ new podcasting format.) At VQR, we hope to broaden the literary blogosphere by providing a forum for writers who don’t normally blog, to be able to react quickly with analysis of relevant current events (which is hard to do with a quarterly), and to broaden the publication’s reach on-line.

We have big plans for this blog — think of the blog right now as the first draft. We’ll churn in the weeks and months ahead until we get it right, and then we’ll keep right on churning, just to keep up.

Winter VQR online.

We’ve got the Winter 2006 issue of Virginia Quarterly Review online now with, as always, a few articles available to non-subscribers. This issue is an unusual one — it’s dedicated to the topic of AIDS in Africa, featuring a series of articles exploring all of the facets of the epidemic. VQR CoverIt makes for heavy reading, but it’s totally worth it. I particularly enjoyed Jann Turner’s “Nightgirls,” which chronicles the week that the author spent with prostitutes that work at a truck stop in Mozambique.

I’ve got to mention Helen Epstein’s pair of articles, though I have to admit that I haven’t finished one of them just yet. (Some may recall that I recommended a good read of Epstein’s “The Hidden Cause of AIDS in Africa” during the discussion of erstwhile candidate Chris Craddock’s bizarre, election-losing assertion that AIDS is epidemic in Africa because “Africans will have sex with anything that has a pulse.”) Epstein contributes “AIDS and Africa’s Hidden War” and The Underground Economy of AIDS” to the latest VQR. Her writing, as always, goes way beyond the surface, leaving the reader feeling flush with new insight. I only know her work from The New York Times and New Scientist, so I’m really wowed to see her writing for Virginia Quarterly Review.

There’s lots of other great stuff in the issue, including the second installment of Art Spiegelman’s “Portrait of the Artist as a Young %@?*!,” a pair of poems by Billy Collins, and an original piece of fiction by Steve Almond.