The tech blogosphere was humming last week about FizzBuzz, a simple test to figure out if your candidate can write even a trivial program.
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
At Innova, we've always been into test-first hiring, but we've recently started asking candidates to write some code over the phone to avoid the disruption that on-site shadowing experiences can create for both candidates and Innova.
Like most shops, we spend a lot of time doing basic CRUD. Unlike most shops, we're using databases for lots of heavy data processing too. Our biggest databases have surpassed 1TB now. While we have a great DBA for handling the plumbing, we still need developers who know how to work with data. The thing about FizzBuzz, is that it is almost too easy. Yet there are an outrageous number of programmers who can't solve it properly.
I came up with another similar question last week, and with a few phone screens under our belt (three four to be exact), we've been shocked that none of our candidates could answer it, even with lots of hints. And we're trying to hire experienced developers (>>8 years).
Now, this question is harder than FizzBuzz to be sure, and because it is deceptively simple (versus being truly fall-off-a-log simple), it tends to make people who don't like to think very hard stick out like a sore thumb. Already, we've elliminated a few people who probably program mostly by coincidence. Here is the question:
TVModel (VARCHAR) DateUpdated (DATETIME) Price (MONEY)
Unfortunately, I haven't been very consistent updating my data. Sometimes I've only updated prices for a few TVs, without bothering to update the full set.
Write a set of queries that result in a unique list of TV Models and the most recent price associated with each TV Model. Each TV Model should only occur in the result set once, and every TV Model I've ever priced should be present in the result set. The dataset should look like this:| TVModel | MostRecentPrice |
| Sony x300 | $399.99 |
| Samsung v100 | $599.99 |
| … | … |
So, if you can answer this question (ideally in your sleep), we'd love to hear from you.

June 21st, 2007 at 3:38 pm
I believe I have a simple solution for this problem, I know it’s an old post on here but I can’t help but to solve a puzzle and it doesn’t look as though anyone else tried to solve it.
My query I constructed based off of a table you describe: “select TVModel, Price, max(DateUpdated) as LastUpdate from T_Prices group by TVModel;”
Cheers
July 4th, 2007 at 7:24 pm
For anyone who stumbles upon this page, the above post is wrong, it’s actually:
SELECT TVModel, Price, DateUpdated FROM TPrices as T WHERE DateUpdated = ( select max(DateUpdated) from TPrices where TVModel= T.TVModel)
The previous commenter’s SQL doesn’t return the correct prices associated with the newest record. And if you guys read through your comments, I like your style. I’m moving to Columbus shortly and am a web developer, do you accept applications from people who don’t drink?
July 16th, 2007 at 10:46 am
[...] example, did you know we have an excellent post that outlines our SQL interview question that so far nobody has answered correctly? No? [...]
September 4th, 2007 at 7:20 pm
[...] the exceptional work of our team here at Innova. This week reminded me that the work we do to find and build the best team in the business is all worth it. I’m proud of everyone, especially [...]