-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path$readme.txt
62 lines (45 loc) · 1.96 KB
/
$readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FIXME design - search for these, which designate request for external review
TODO major - designates significant unimplemented
Significant bug fixes:
See nw/trans_tests/upd_order_reuse, and logic_engine/exec_row_logic/logic_row#save_altered_parents
Various misc copy/paste:
update orderdetail set amount = unitPrice * quantity
update "Order" set AmountTotal =
(select sum(orderdetail.amount) from orderdetail where orderdetail.orderid = "Order".id);
select id, customerid, shippeddate, amounttotal from "Order" where id = 11011;
select ProductName, UnitsInStock, UnitsShipped from Product where id = 58;
select id, balance, creditlimit from customer where id="ALFKI";
960
update Customer set Balance =
(select sum("Order".amounttotal) from "Order" where Customer.id = "Order".customerid
and "Order".shippeddate is null);
update Customer set UnpaidOrderCount =
(select count("Order".amounttotal) from "Order" where Customer.id = "Order".customerid
and "Order".shippeddate is null);
update Customer set Balance = 0 where balance is null;
update Customer set Balance = 960 where id="ALFKI";
update Customer set creditlimit = balance + 100;
830 orders, 21 not shipped
11045 for BOTTM (22607.7 ==> 1309.5)
ALFKI has balance=0
select id, amounttotal from "Order" where id=11011;
CREATE TABLE IF NOT EXISTS "OrderX"
(
"Id" INTEGER PRIMARY KEY AUTOINCREMENT,
"CustomerId" VARCHAR(8000) NULL,
"EmployeeId" INTEGER NOT NULL,
"OrderDate" VARCHAR(8000) NULL,
"RequiredDate" VARCHAR(8000) NULL,
"ShippedDate" VARCHAR(8000) NULL,
"ShipVia" INTEGER NULL,
"Freight" DECIMAL NOT NULL,
"ShipName" VARCHAR(8000) NULL,
"ShipAddress" VARCHAR(8000) NULL,
"ShipCity" VARCHAR(8000) NULL,
"ShipRegion" VARCHAR(8000) NULL,
"ShipPostalCode" VARCHAR(8000) NULL,
"ShipCountry" VARCHAR(8000) NULL, AmountTotal Decimal(10,2),
FOREIGN KEY (CustomerId) REFERENCES Customer(Id),
FOREIGN KEY (EmployeeId) REFERENCES Employee(Id)
);
insert into Orderx select * from "Order";