[Q] Daves's top 10 SQL question
Date: 1996/03/13
Message-ID: <Do88pq.CtK_at_statcan.ca>#1/1
Dave has a catalogue of Stupid Pet Tricks tapes. Each has a NAME and an outrageous SCORE factor (higher is better and there's no limit). Now Dave has hundreds of these entries, say in an Oracle table. On his next greatest hits of David Letterman show, he wants to show only the best 10.
Help Dave find a solution and code the SQL query.
But seriously, how can you code a SQL query to first order records greatest to least then pick out only a pre-selected number of them without prior knowledge of their distribution. This strikes me as a common, even simple thing to do, but I can't see how to do it, and I've written some pretty twisted queries.
Your assistance with this is appreciated. Thank you.
PGY (Opinions expressed are mine and mine alone, sorry Dave)
################################################################Received on Wed Mar 13 1996 - 00:00:00 CET
# Paul Young #
# youngpa_at_statcan.ca #
# Statistics Canada #
################################################################