Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Max & Min Amount through SQL
Message
De
28/12/1996 22:40:11
Willie Chen
Infowide Computer Trading
Penang, Malaisie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Max & Min Amount through SQL
Divers
Thread ID:
00016113
Message ID:
00016113
Vues:
88
Hi,

i have a parent child table for invoice.

Parent Table -Invoice
: Invoice_Id, Invoice_Amount, Invoice_item, Invoice_Date.

Child Table - Invoice_Detail
: Item_#, Product_Id, Quantity, Unit_Price, Invoice_Id.

i need to know the following through sql,
hope you can help me, thanks ...

case 1: Max & Min Amount of Purchase of a day.
--------------------------------------------------------------------------
Required output : Type of Invoice Invoice_Number Invoice_Amont
--------------- -------------- -------------
Maximum Invoice 9999999999 $99,999.99
Minumum Invoice 9999999999 $99,999.99

case 2: 1, 2, 3 item & above invoice of a day.
--------------------------------------------------------------------------
require output : Type of Invoice Number_Of_Invoice Total_Amount
--------------- ----------------- -------------
1_Item_Invoice 999 $9,999,999.99
2_Item_Invoice 999 $9,999,999.99
3_Item_Above 999 $9,999,999.99

case 3: Total & Average of Invoice in a day
--------------------------------------------------------------------------
require output : Type of Invoice Number_Of_Invoice Total_Amount
--------------- ----------------- -------------
Total_Invoice 999 $9,999,999.99
Average_Invoice 999 $9,999,999.99


Thanks In Advance

Willie Chen
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform