Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Max & Min Amount through SQL
Message
From
28/12/1996 22:40:11
Willie Chen
Infowide Computer Trading
Penang, Malaysia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Max & Min Amount through SQL
Miscellaneous
Thread ID:
00016113
Message ID:
00016113
Views:
82
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
Next
Reply
Map
View

Click here to load this message in the networking platform