Skip to content

It's again about the numbers - reloaded Mystery Cache

This cache has been archived.

Gromits Team: Ja, der ist wohl weg. Da der eh' sehr umstritten war mache ich den wohl eher nicht neu.

Eine große Menge frisch gesägtes Holz ist wohl die Erklärung dass er entfernt wurde.

Die Dose lag unter einer uralten und lange gekappten Wurzel, also überhaupt kein Problem für die Holzernter... ich überlege ob ich gleich mal mit einem Hänger deren Holz abholen komme. Gehört mir nicht, aber was so rumliegt darf man anscheinend einfach wegnehmen...

More
Hidden : 8/17/2011
Difficulty:
5 out of 5
Terrain:
2 out of 5

Size: Size:   regular (regular)

Join now to view geocache location details. It's free!

Watch

How Geocaching Works

Please note Use of geocaching.com services is subject to the terms and conditions in our disclaimer.

Geocache Description:

or as an alternative title...

Now it get's nasty.

And don't blame me for this nightmare mess... it was The Cavies who discovered the original irregularity... I just stumbled over why it's happening and made the cache out of it! ;-)

English description below
If you want to help with a french or dutch description - I'd be happy to put up the listing


Deutsche Version

An den oben genannten Koordianten gibt es nichts zu finden - nur Eisenbahnschienen. Bitte dort nicht suchen!

Dieser Teil ist etwas anders als der Rest der Serie, hier ist die Abfrage theoretisch einfach. Theoretisch - denn praktisch funktioniert die Theorie nicht.

Das Ergebnis was wir heute brauchen ist eine einfache Auflistung der Produkte, der verschiedenen Preise zu dem das Produkt verkauft wurde (mit Rabatt) und wieviele Stück zu dem Preis verkauft wurden.

Diesmal gibt's sogar die Abfrage, in deutscher Umschreibung, frei Haus (siehe unten).

Abfrage läuft? Sehr schön, das war einfach!
Warum dann fünf Sterne? Ganz einfach: Das Ergebnis ist falsch! Das Ergebnis scheint auf die Tabelle unten zu passen, aber an den verdeckten Stellen bekommt ihr falsche Zahlen.
Die Abfrage selber ist so vollständig und nicht ganz falsch, sie ist vielleicht etwas ungenau und lässt der SQL Engine etwas Interpretationsspielraum. Diesen Spielraum finden, erklären und beseitigen ist eure Aufgabe!
Wenn ihr das Problem verstanden habt und beheben konntet dann kennt ihr jetzt auch das Keyword welches dazu nötig war. Dieses geht auch mit in die Rechnung ein.

Je nach Version und Hersteller eures bevorzugten SQL Servers werdet ihr das Problem gar nicht haben und deshalb auch nicht bemerken.
Da aber hier diesmal nicht Abfrage sondern genau das Herausarbeiten des Phänomens im Vordergrund steht habe ich mich entschlossen diesen Teil exklusiv nur auf Microsoft SQL Server auszurichten.
Wie? Naja, ihr braucht die Lösungstabelle zweimal, mit Fehler und ohne Fehler... Nur bei SQL Server konnte ich den Fehler genau so produzieren, nur da könnt ihr ihn finden, nur da bekommt ihr beide Resultate.
Ist MS SQL Server denn schlechter als andere wenn falsche Ergebnisse produziert werden? Nein, ist er nicht - es wurde lediglich eine kleine spezielle Performace-Abwägungen getroffen aber dann im Query nicht mehr berücksichtigt.
Ohne die, und mit der gleichen Einstellung die die "sofort richtig" arbeitenden SQL-DB-Engines haben würde auch der MS SQL sofort die richtige Lösung liefern - oder aber man optimiert und denkt im Query dran.
Und was macht der, der keinen SQL Server zum experimentieren hat? Kann man diesen Cache dann gar nicht lösen? Nein: Auf Microsoft.com bekommt ihr alles was ihr braucht: SQL Server Express, Management Studio Express, BOL (Books online, die Anleitung) sowie die Northwind DB - alles freie Downloads. Dann fehlt nur noch etwas installieren, lesen und experimentieren.

Dies ist ein weiterer Teil (Nummer V) einer Serie von Mysterycaches welche sich mit Analysemöglichkeiten von Daten beschäftigen.
Teil I: It's not about the numbers
Teil II: It's sometimes about the numbers
Teil III: It's only about the numbers
Teil IV: It's again about the numbers
Teil V: It's again about the numbers - reloaded

English Language version

There is nothing to be found at the coordinates, just a railway. Please do not search there!

This part is a bit different than the others because in theory this query is simple. In theory, because in real life the theory will not work.

The result we are looking for today ist a simple list of products, the different (discounted) prices they were sold for and the total number of units for that price.

This time the query is provided for free (see below).

The query executes and returns rows? Great, that was easy!
But why the five starts? Very simple: The result is wrong! The table seems to match the solution below, but your numbers will be wrong in the places where it matters!
The query itself is complete and logically sound, it is maybe not absolutly precise and leaves a bit of room for interpretation to the SQL Engine. To remove this ambiguity will be your task!
Once you understood the problem you will also know the keyword you needed to get the right result. This keyword is also needed for calculation.

Depending on the version and manufacturer of your prefered sql tool the effect does not even show itself.
Because this time the query is not our focus but this specific issue I decided to create this part exclusivly for Microsoft SQL Server.
How? Well, you need the result table twice, with error and without error... only on SQL Server you can observe the effect, only there you can find both results..
Is MS SQL Server not so good than other servers if it produces faulty results? No, it is not - in this case, a tiny specific optimization decision was made at one place, but not controlled in the query.
Without this and with the same setting that the "correct" DB-Enignes use the MS SQL would also produce correct results - or you do optimise but remember in the query.
And what do you do if you do not have an SQL Server? Is it impossible to do this cache? No: On Microsoft.com you get everything you need: SQL Server Express, Management Studio Express, BOL (Books online, the manual) as well as the Northwind DB - free downloads. Than some installing, reading and you're ready to go.

This is another part (Part V) of a set of mysteries that focus on data analysis.
Part I: It's not about the numbers
Part II: It's sometimes about the numbers
Part III: It's only about the numbers
Part IV: It's again about the numbers
Part V: It's again about the numbers - reloaded

Die Abfrage
The query

SELECT
  Products.ProductName
  , [Order Details].UnitPrice * (1-[Order Details].Discount) AS Price
  , SUM([Order Details].Quantity) AS TotalQuantity
FROM
  [Order Details]
  INNER JOIN Products ON [Order Details].ProductID = Products.ProductID
GROUP BY
  [Order Details].UnitPrice * (1-[Order Details].Discount)
  , Products.ProductName
ORDER BY
  TotalQuantity DESC
  , Products.ProductName DESC
  , Price DESC

Die Formel
The formula

N 50° 46 . [W-F1-F2-G1-G2] [A2-A1] [X/(D1+D2)]
E 6° 11 . [Y/(B1+B2)] [C1-C2] [E1*2+E2*Z]

Die Werte
The values

Solution   A     B     C     D     E     F     G  
Wrong - 1              
Right - 2              

Der Wert für V geht nicht in die Formel ein - You will not need the value given for V
Keyword   W     X     Y     V     Z  
Letter        N  
Number        14  

Lösung überprüfen
Check your solution

Die Daten
The Data

ProductName Price TotalQuantity
Camembert Pierrot 34 594
Uncle Bob's Organic Dried Pears 30 583
Guaraná Fantástica 4,5 530
Raclette Courdavault 55 515
Jack's New England Clam Chowder 9,65 496
...
Raclette Courdavault 44 350
? ? 3AB
...
Nord-Ost Matjeshering 25,89 262
? ? 25C
...
Chang 19 243
? ? 24D
...
Chang 14,25 182
? ? 18E
...
Röd Kaviar 15 152
? ? 1FG

Seitenzähler
Page Counter

free counters

Additional Hints (Decrypt)

QR: Eägfry: Nanylfvreg qvr Qngra hz qvr Xyrvavtxrvg mh svaqra qvr vz Dhrel sruyg, ahe avpug mh tranh neorvgra! Pnpur: Onhzfghzcs RA: Zlfgrel: Nanylfr gur qngn gb svaq gur gval ovg zvffvat va gur dhrel, qb abg jbex gb cerpvfr! Pnpur: Gerr fghzc

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)