Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query without max()
Message
De
16/09/2019 15:45:40
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
16/09/2019 11:44:39
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01670845
Message ID:
01670901
Vues:
75
>Cetin
>
>You are refering to a recursive query, which I (I admit the mischaracterization as recursive CTEs can be use in creating records as well) referred to as for solving hierarchical problems. This is where I almost exclusively use them for.
>
>The challenge was to find me an example where using CTE as a subquery would lead to any significant advantage.
>
>Walter,

OK now it is your turn to write this without a CTE (a sample from postgreSQL documentation):
WITH w AS (
    SELECT key, very_expensive_function(val) as f FROM some_table
)
SELECT * FROM w AS w1 JOIN w AS w2 ON w1.f = w2.f;
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform