You are on page 1of 23

CI6114 Database Systems

Implementation of a Database Application

(Stock Exchange)

SESSION 2007/2008

SEMESTER 1

Hardi Kusumawijaya [G0701499F]

Randy Sugianto [G0701956L]

Thwe Mi Mi Ko [G0701735C]

INFORMATION SYSTEMS COURSE


WEE KIM WEE SCHOOL OF
COMMUNICATION AND INFORMATION
NANYANG TECHNOLOGICAL UNIVERSITY
1 Creating an EER Diagram
A c tiv ity ID
Fee S E M IN A R P R O M O T IO N

D a te
" s e m in a r " " p r o m o t io n "

P a id Venue
d
Typ e
T yp e
p a r tic ip a te M A C T IV IT Y
P a ssw o rd N IC A d d re s s
D e s c r ip tio n
Name N
P hone N

B ir th d a y o r g a n iz e Name

USER 1
U s e r ID A d d re s s

Type CORPORA
C o rp R e g N o
T IO N
T yp e d C u s tN o P o r tfo lio ID C ash A m ou n t P hone

1
" a d m in " "b ro ke r" " c u s to m e r "
S ym b o l
is s u e
A D M IN BROKER 1 e m p lo y N C U S TO M E R 1 has 1 P O R T F O L IO N own
In d e x N o
N
1 M
r e fe r r e r r e fe r e e
S ta ffN o L ic e n s e N o 1 N V a lu e
Q u a n tity
L im ite d S TO CK
r e fe r own
O r d e r ID
U p d a te T im e
N 1
T yp e
S ym b o l V a lu e L IM IT E D _ N c o n ta in s P r ic e
ORDER

BACKUP_ P r ic e
U p d a te T im e Lot
S TO C K Lot

T r a n s a c tio n T r a n s a c tio n T r a n s a c tio n


Q u a n tity
In d e x N o P r ic e T im e Q u a n tity P r ic e
B lo c k e d

Explanation of EER Diagram


We assume a user may have multiple address and phone number so we keep these two as multiple
value attribute in USER entity. We also have three derived attributes for different user types which are
ADMIN, BROKER, and CUSTOMER because they have similar attributes among them except
StaffNo attribute for ADMIN entity, LicenseNo attribute for BROKER entity, and CustNo attribute for
CUSTOMER entity. Since a customer may be referred by another customer, so we use recursive
relationship for CUSTOMER entity and the degree of relationship becomes one to many because one
customer (referrer) can refer to more than one customer (referee). We use total participation for
BROKER entity as it is mandatory for a broker to have at least one customer and optional for customer
to have a broker. We use total participation for PORTFOLIO entity as it is mandatory to be owned by at
least one customer and a customer may or may not have a portfolio.
A portfolio may contain more than one stock while a stock may be owned by more than one portfolio
so the degree relationship between them is many to many. A portfolio can own none to more than one
limited order and a limited order must relate to at least a portfolio which produces one-to-many
relationship among PORTFOLIO and LIMITED ORDER entities. A limited order can contain at least
one or more than one stock (total participation) and a stock can be in different limited orders so one-to-
many relationship is developed. BACKUP_STOCK entity has no relationship as we use it to backup
stock data.
Many users can participate in many activities and we assume that an activity must have at least one
participant therefore the degree of relationship is many to many with total participation for ACTIVITY

2007-10-19 1
entity. Since the payment of a registration fee depends on a particular user and a particular activity, so
we add attribute Paid at the PARTICIPATE relation. There are two types of activity: SEMINAR and
PROMOTION for ACTIVITY entity and differences between these two are seminar needs payment for
registration and promotion is free to attend (assumption). So, we put Fee attribute in SEMINAR entity.
A corporate may organize none to more than one activity while an activity must be held by one
company only at a time therefore we choose total participation for ACTIVITY entity and the degree of
relationship is one to many. A corporation can issue more than one stock, at the same time a stock has
to be issued by a corporation so total participation is for STOCK entity and one-to-many relationship is
applied.

USER
Attribute Data type
PK UserID int
Name varchar(40)
Password varchar(20)
Birthday datetime
NIC varchar(16)
Type varchar(8)

USERADDRESS
Attribute Data type
PK/FK UserID references USER.UserID int
Address varchar(200)

USERPHONE
Attribute Data type
PK/FK UserID references USER.UserID int
Phone varchar(40)

ADMIN
Attribute Data type
PK/FK UserID references USER.UserID int
StaffNo int

BROKER
Attribute Data type
PK/FK UserID references USER.UserID int
LicenseNo int

CUSTOMER
Attribute Data type
PK/FK UserID references USER.UserID int
CustNo int
FK ReferrerID references CUSTOMER.UserID int
FK BrokerID references BROKER.UserID int

2007-10-19 2
CORPORATION
Attribute Data type
PK CorpRegNo varchar(20)
Name varchar(40)
Address varchar(255)
Phone varchar(20)

ACTIVITY
Attribute Data type
PK ActivityId int
Description varchar(255)
Date datetime
Venue varchar(255)
Fee decimal(10,2)
FK CorpRegNo references CORPORATION.CorpRegNo varchar(20)
Type varchar(9)

STOCK
Attribute Data type
PK Symbol varchar(10)
IndexNo int
Value decimal(10,2)
UpdateTime datetime
Lot int
Price decimal(10,2)
FK CorpRegNo references CORPORATION.CorpRegNo varchar(20)
Blocked bit

BACKUP_STOCK
Attribute Data type
PK Symbol varchar(10)
PK UpdateTime datetime
IndexNo int
Value decimal(10,2)
Lot int
Price decimal(10,2)

PORTFOLIO
Attribute Data type
PK PortfolioID int
CashAmount decimal(10,2)
FK UserId references CUSTOMER.UserID int

2007-10-19 3
LIMITEDORDER
Attribute Data type
PK LimitedOrderID int
Price decimal(10,2)
Type varchar(4)
Quantity int
TransactionTime datetime
TransactionPrice decimal(10,2)
TransactionQuantity int
FK PortfolioID references PORTFOLIO.PortfolioID int
FK Symbol references STOCK.Symbol varchar(10)

OWN
Attribute Data type
PK/FK PortfolioID references PORTFOLIO.PortfolioID int
PK/FK Symbol references STOCK.Symbol varchar(10)
Quantity int

PARTICIPATE
Attribute Data type
PK/FK UserID references USER.UserID int
PK/FK ActivityID references ACTIVITY.ActivityID int
Paid bit

2 Normalization

1NF
USERADDRESS

UserID, Address

USERPHONE

UserID, Phone

Address and Phone are multi-valued attributes (a user may have more than one address and
phone).According to remove the repeating group of data in USER table, these attributes is stored in two
separate tables: USERADDRESS and USERPHONE together with the primary key UserID for link to
USER table.
For USERADDRESS, UserID and Address becomes a compound key and UserID and Phone is for
USERPHONE to uniquely identify the records.

2007-10-19 4
2NF
All relations have single-attribute primary key except from BACKUP_STOCK relation whose data
depends on UpdateTime and Symbol and no partial key dependency is found.
All non-key attributes is fully dependent on primary key in all relations so all are already in 2NF.

3NF
Although non-key dependency is found in STOCK relation i.e. every attributes value can retrieve
using IndexNo which is not a primary key but unique key for that relation, there is no duplicate value
for indexno and symbol together in every record.
As there is no dependency between non-key items in the rest of the relations so 3NF is already
satisfied.

3 Data Definition Language


-- ----------------------------

-- table structure for USER

-- ----------------------------

create table [USER] (

UserID int not null primary key,

Name varchar(40) not null,

Password varchar(20) not null,

Birthday datetime null,

NIC varchar(16) null,

Type varchar(8) not null,

check ([Type] = 'customer' or [Type] = 'broker' or [Type] = 'admin')

);

-- ----------------------------

-- table structure for ADMIN

-- ----------------------------

create table ADMIN (

UserID int not null primary key foreign key references [USER] (UserID),

StaffNo int not null

);

-- ----------------------------

-- table structure for BROKER

2007-10-19 5
-- ----------------------------

create table BROKER (

UserID int not null primary key foreign key references [USER] (UserID),

LicenseNo int not null

);

-- ----------------------------

-- table structure for CUSTOMER

-- ----------------------------

create table CUSTOMER (

UserID int not null primary key foreign key references [USER] (UserID),

CustNo int not null,

ReferrerID int null foreign key references CUSTOMER (UserID),

BrokerID int foreign key references BROKER (UserID)

);

-- ----------------------------

-- table structure for USERADDRESS

-- ----------------------------

create table USERADDRESS (

UserID int not null foreign key references [USER] (UserID),

Address varchar(200) not null,

primary key (UserID, Address)

);

-- ----------------------------

-- table structure for USERPHONE

-- ----------------------------

create table USERPHONE (

UserID int not null foreign key references [USER] (UserID),

Phone varchar(40) not null,

primary key (UserID, Phone)

);

2007-10-19 6
-- ----------------------------

-- table structure for CORPORATION

-- ----------------------------

create table CORPORATION (

CorpRegNo varchar(20) not null primary key,

Name varchar(40) not null,

Address varchar(255) null,

Phone varchar(20) null

);

-- ----------------------------

-- table structure for ACTIVITY

-- ----------------------------

create table ACTIVITY (

ActivityID int not null primary key,

Type varchar(9) not null,

Description varchar(255) null,

Date datetime null,

Venue varchar(255) null,

Fee decimal(10,2) null,

CorpRegNo varchar(20) not null foreign key references CORPORATION (CorpRegNo),

check ((Type = 'seminar' and Fee is not null) or (Type = 'promotion' and Fee is null))

);

-- ----------------------------

-- table structure for BACKUP_STOCK

-- ----------------------------

create table BACKUP_STOCK (

Symbol varchar(10) not null,

IndexNo int not null,

Value decimal(10,2) not null,

2007-10-19 7
UpdateTime datetime not null,

Lot int not null,

Price decimal(10,2) not null,

primary key (Symbol, UpdateTime)

);

-- ----------------------------

-- table structure for STOCK

-- ----------------------------

create table STOCK (

Symbol varchar(10) not null primary key,

CorpRegNo varchar(20) not null foreign key references CORPORATION (CorpRegNo),

IndexNo int not null,

Value decimal(10,2) not null,

UpdateTime datetime not null,

Lot int not null,

Price decimal(10,2) not null,

Blocked bit not null default (0)

);

-- ----------------------------

-- table structure for PORTFOLIO

-- ----------------------------

create table PORTFOLIO (

PortfolioID int not null,

UserID int not null unique foreign key references CUSTOMER (UserID),

CashAmount decimal(10,2) null,

primary key (PortfolioID)

);

-- ----------------------------

-- table structure for LIMITEDORDER

-- ----------------------------

create table LIMITEDORDER (

2007-10-19 8
LimitedOrderID int not null primary key,

PortfolioID int not null foreign key references PORTFOLIO (PortfolioID),

Symbol varchar(10) not null foreign key references STOCK (Symbol),

Price decimal(10,2) not null,

Type varchar(4) not null,

Quantity int not null,

TransactionTime datetime null,

TransactionPrice decimal(10,2) null,

TransactionQuantity int null,

check (Type = 'buy' or Type = 'sell')

);

-- ----------------------------

-- table structure for OWN

-- ----------------------------

create table OWN (

PortfolioID int not null foreign key references PORTFOLIO (PortfolioID),

Symbol varchar(10) not null foreign key references STOCK (Symbol),

Quantity int not null,

primary key (PortfolioID, Symbol)

);

-- ----------------------------

-- table structure for PARTICIPATE

-- ----------------------------

create table PARTICIPATE (

ActivityID int not null foreign key references ACTIVITY (ActivityID),

UserID int not null foreign key references [USER] (UserID),

Paid bit not null,

primary key (ActivityID, UserID)

);

4 Triggers
create trigger noChangeSymbol on STOCK for update as

if update(Symbol) raiserror('Cannot change Symbol name',16,1);

2007-10-19 9
go

create trigger backupStock on STOCK for update as

declare @Symbol varchar(10);

declare @UpdateTime datetime;

declare @IndexNo float;

declare @Value decimal(10,2);

declare @Lot int;

declare @Price decimal(10,2);

select @Symbol = Symbol, @UpdateTime = UpdateTime, @IndexNo = IndexNo, @Value = Value,

@Lot = Lot, @Price = Price from DELETED;

insert into BACKUP_STOCK (Symbol, UpdateTime, IndexNo, Value, Lot, Price)

values (@Symbol, @UpdateTime, @IndexNo, @Value, @Lot, @Price);

go

create trigger updateStock on STOCK for update as

declare @min int;

select @min = datepart(hour, UpdateTime)*60 + datepart(minute, UpdateTime) from INSERTED;

if @min > 16*60 or @min < 9*60

raiserror('Stock can be updated only from 9am to 4pm',16,1);

go

create trigger updateStockTiming on STOCK for update as

if not update(UpdateTime) raiserror('Cannot update stock info without changing the

UpdateTime',16,1);

go

create trigger limitedOrderExecuted on LIMITEDORDER for update as

if update(TransactionTime) or update(TransactionQuantity) or update(TransactionPrice)

if not (update(TransactionTime) and update(TransactionQuantity) and

update(TransactionPrice))

raiserror('If the limited order is executed, all fields of transaction must be

filled',16,1);

go

create trigger blockStock on STOCK for update as

declare @diff decimal(10,2);

2007-10-19 10
declare @maxDiff decimal(10,2);

select @diff = abs(INSERTED.Price - DELETED.Price) from INSERTED, DELETED;

select @maxDiff = avg(Price) * 2 from STOCK;

if @diff > @maxDiff

update STOCK set Blocked = 1 where Symbol = (select Symbol from INSERTED);

go

5 Queries
create procedure query1_others as

select * from STOCK;

go

create procedure query1_guest as

select * from BACKUP_STOCK as B1 where UpdateTime = (select max(UpdateTime) from

BACKUP_STOCK as B2 where UpdateTime < dateadd(hh, -1, getdate()) and B1.Symbol = B2.Symbol)

go

create procedure query2_bySymbol @symbol varchar(10) as

select * from STOCK where Symbol = @symbol

go

create procedure query2_byIndexNo @IndexNo int as

select * from STOCK where IndexNo = @indexNo

go

create procedure query3_stat @date datetime as

select T1.Symbol, Range, OpeningPrice, ClosingPrice from (

select Symbol, max(Price) - min(Price) as Range

from BACKUP_STOCK

where datediff(day, UpdateTime, @date) = 0

group by Symbol

) as T1, (

select Symbol, Price as OpeningPrice

from BACKUP_STOCK as B1

where datediff(day, UpdateTime, @date) = 0 and UpdateTime <= all (

select UpdateTime

from BACKUP_STOCK as B2

2007-10-19 11
where datediff(day, UpdateTime, @date) = 0 and B1.Symbol = B2.Symbol

) as T2, (

select Symbol, Price as ClosingPrice

from BACKUP_STOCK as B1

where datediff(day, UpdateTime, @date) = 0 and UpdateTime >= all (

select UpdateTime

from BACKUP_STOCK as B2

where datediff(day, UpdateTime, @date) = 0 and B1.Symbol = B2.Symbol

) as T3

where T1.Symbol = T2.Symbol and T2.Symbol = T3.Symbol

go

create procedure query3_top @date datetime as

select top 5 Symbol, sum(TransactionPrice * TransactionQuantity) as TradeAmount

from LIMITEDORDER

where TransactionTime is not null and datediff(day, TransactionTime, @date) = 0

group by Symbol

go

create procedure query4 as

select top 3 UserID, C from BROKER, (

select BrokerID, count(*) as C from CUSTOMER group by BrokerID

) as T1

where BROKER.UserID = T1.BrokerID order by T1.C

go

create procedure query5 as

with PARENT (Root, ReferrerID, UserID) as (

select ReferrerID, ReferrerID, UserID

from CUSTOMER

where ReferrerID is not NULL

union all

select PARENT.Root, CUSTOMER.ReferrerID, CUSTOMER.UserID

from CUSTOMER, PARENT

where PARENT.UserID = CUSTOMER.ReferrerID

2007-10-19 12
) select top 1 Root, count(*) as C from PARENT group by Root order by C desc;

go

create procedure query6 as

select UserID from (

select C.UserID, count(*) as CountStock from CUSTOMER as C, PORTFOLIO as P , OWN as O

where C.UserID = P.UserID and P.PortfolioID = O.PortfolioID and O.Quantity >= 1

group by C.UserID

) as T1, (

select count(*) as CountStock from STOCK

) as T2

where T1.CountStock = T2.CountStock

go

6 Sample Data
-- data for USER values ('11', 'Ogre-customer', '567', '7/7/1922 12:00:00 AM',

'11111111', 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('1', 'Admin1', '123', '1/1/1985 12:00:00 AM', '111', values ('12', 'Fake-Customer', '567', '8/8/1933 12:00:00 AM',

'admin'); '12121212', 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('2', 'Yuku', '123', '1/1/1983 12:00:00 AM', '222', values ('13', 'BigBossCustomer', '567', '9/9/1944 12:00:00 AM',

'customer'); '13131313', 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('3', 'MiMiKo Brokerwoman', '123', '12/12/1987 12:00:00 AM', values ('14', 'Tooth-paste-man', '567', '10/10/1955 12:00:00 AM',

'333', 'broker'); '14141414', 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('4', 'tmmk', '123', '1/1/1986 12:00:00 AM', '444', values ('15', 'Morning Comer', '567', '11/11/1966 12:00:00 AM',

'customer'); '15151515', 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('5', 'Admin2', '123', '1/1/1986 12:00:00 AM', '555', values ('16', 'Late Comer', '789', '12/12/1988 12:00:00 AM',

'admin'); '16161661', 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('6', 'Hardi Brokerman', '123', '2/2/1987 12:00:00 AM', values ('17', 'Mr bean', '789', '1/1/1911 12:00:00 AM', '17171717',

'666', 'broker'); 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('7', 'goodcustomer', '345', '3/3/1988 12:00:00 AM', '777', values ('18', 'Byron', '789', '2/2/1922 12:00:00 AM', '18181818',

'customer'); 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('8', 'badcustomer', '345', '4/4/1990 12:00:00 AM', '888', values ('19', 'Choi', '789', '3/3/1933 12:00:00 AM', '19191919',

'customer'); 'broker');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('9', 'middlecustomer', '345', '5/5/1991 12:00:00 AM', '999', values ('20', 'Wangjin', '789', '4/4/1944 12:00:00 AM', '20202020',

'customer'); 'admin');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

values ('10', 'uglecustomer', '345', '6/6/1999 12:00:00 AM', '1010', values ('21', 'Angry Customer', '349', '5/5/1955 12:00:00 AM',

'customer'); '21212121', 'customer');

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into [USER] (UserID, Name, Password, Birthday, NIC, Type)

2007-10-19 13
values ('22', 'Happy Customer', '971', '5/5/1955 12:00:00 AM', ('10', '6', 9, 6);

'22222222', 'customer'); insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) ('11', '7', 9, NULL);

values ('23', 'Dented Customer', '531', '5/5/1955 12:00:00 AM', insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

'23232323', 'customer'); ('12', '8', 9, NULL);

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

values ('24', 'Metadata Customer', '346', '5/5/1955 12:00:00 AM', ('13', '9', 9, 3);

'24242424', 'customer'); insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) ('14', '10', 13, 19);

values ('25', 'Boring Customer', '266', '5/5/1955 12:00:00 AM', insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

'25252525', 'customer'); ('15', '11', NULL, 19);

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

values ('26', 'Smart Customer', '220', '5/5/1955 12:00:00 AM', ('16', '12', 7, 19);

'26262626', 'customer'); insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) ('17', '13', NULL, NULL);

values ('27', 'Bad Customer', '614', '5/5/1955 12:00:00 AM', insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

'27272727', 'customer'); ('18', '14', NULL, 3);

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

values ('28', 'Funny Customer', '516', '5/5/1955 12:00:00 AM', ('21', '15', NULL, 3);

'28282828', 'customer'); insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) ('22', '16', 16, 19);

values ('29', 'Partying Customer', '281', '5/5/1955 12:00:00 AM', insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

'29292929', 'customer'); ('23', '17', 16, NULL);

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

values ('30', 'Old Customer', '849', '5/5/1955 12:00:00 AM', ('24', '18', NULL, 3);

'30303030', 'customer'); insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

insert into [USER] (UserID, Name, Password, Birthday, NIC, Type) ('25', '19', NULL, 6);

values ('31', 'Leftover Broker', '580', '1/1/1955 12:00:00 AM', insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

'31313131', 'broker'); ('26', '20', NULL, 6);

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

-- data for ADMIN ('27', '21', 22, 19);

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

insert into ADMIN (UserID, StaffNo) values ('1', '1'); ('28', '22', 27, 19);

insert into ADMIN (UserID, StaffNo) values ('5', '2'); insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

insert into ADMIN (UserID, StaffNo) values ('20', '3'); ('29', '23', 27, 19);

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values

-- data for BROKER ('30', '24', NULL, 19);

insert into BROKER (UserID, LicenseNo) values ('3', '1'); -- data for USERADDRESS

insert into BROKER (UserID, LicenseNo) values ('6', '2');

insert into BROKER (UserID, LicenseNo) values ('19', '3'); insert into USERADDRESS (UserID, Address) values ('1', '9 Dover

insert into BROKER (UserID, LicenseNo) values ('31', '4'); Dr');

insert into USERADDRESS (UserID, Address) values ('1', '16 Outram

-- data for CUSTOMER Park Dr');

insert into USERADDRESS (UserID, Address) values ('1', '57 Tanjong

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values Pagar Rd');

('2', '1', NULL, 6); insert into USERADDRESS (UserID, Address) values ('1', '60 Simei

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values Dr');

('4', '2', 2, 3); insert into USERADDRESS (UserID, Address) values ('2', '31 Aljunied

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values Dr');

('7', '3', 4, 3); insert into USERADDRESS (UserID, Address) values ('3', '40 Kembangan

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values Dr');

('8', '4', 7, 3); insert into USERADDRESS (UserID, Address) values ('3', '2 Outram

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values Park Dr');

('9', '5', NULL, NULL); insert into USERADDRESS (UserID, Address) values ('3', '45 Clementi

insert into CUSTOMER (UserID, CustNo, ReferrerID, BrokerID) values Dr');

2007-10-19 14
insert into USERADDRESS (UserID, Address) values ('3', '62 Tanah insert into USERPHONE (UserID, Phone) values ('5', '82481826');

Merah Rd'); insert into USERPHONE (UserID, Phone) values ('5', '95415264');

insert into USERADDRESS (UserID, Address) values ('4', '75 Redhill insert into USERPHONE (UserID, Phone) values ('5', '94840387');

Rd'); insert into USERPHONE (UserID, Phone) values ('5', '97704061');

insert into USERADDRESS (UserID, Address) values ('4', '32 Tiong insert into USERPHONE (UserID, Phone) values ('6', '61905850');

Bahru St'); insert into USERPHONE (UserID, Phone) values ('7', '85866267');

insert into USERADDRESS (UserID, Address) values ('5', '92 Tiong insert into USERPHONE (UserID, Phone) values ('10', '85133456');

Bahru Dr'); insert into USERPHONE (UserID, Phone) values ('10', '95129611');

insert into USERADDRESS (UserID, Address) values ('5', '16 insert into USERPHONE (UserID, Phone) values ('11', '86988280');

Commonwealth Rd'); insert into USERPHONE (UserID, Phone) values ('16', '85532822');

insert into USERADDRESS (UserID, Address) values ('6', '35 Tanah insert into USERPHONE (UserID, Phone) values ('16', '98904903');

Merah St'); insert into USERPHONE (UserID, Phone) values ('18', '93282479');

insert into USERADDRESS (UserID, Address) values ('8', '67 Outram insert into USERPHONE (UserID, Phone) values ('18', '84689046');

Park Dr'); insert into USERPHONE (UserID, Phone) values ('21', '68161106');

insert into USERADDRESS (UserID, Address) values ('9', '83 Raffles insert into USERPHONE (UserID, Phone) values ('29', '95702840');

Place Dr'); insert into USERPHONE (UserID, Phone) values ('30', '83571702');

insert into USERADDRESS (UserID, Address) values ('10', '7 insert into USERPHONE (UserID, Phone) values ('30', '89673145');

Queenstown Rd'); insert into USERPHONE (UserID, Phone) values ('30', '65325723');

insert into USERADDRESS (UserID, Address) values ('11', '39 Buona

Vista Rd'); -- data for CORPORATION

insert into USERADDRESS (UserID, Address) values ('12', '66

Queenstown Rd'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('13', '6 Paya ('1', 'Singapore, Pte. Ltd.', 'Singapore', '65-11111111');

Lebar St'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('16', '24 Eunos ('2', 'PT. Indonesia', 'Indonesia', '62-22222222');

St'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('16', '28 Dover ('3', 'Myanmar Incorporated', 'Myanmar', '99-33333333');

Rd'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('16', '41 Raffles ('4', 'Telkom', 'Jakarta', '62-44444444');

Place Rd'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('16', '96 Dover ('5', 'Indosat', 'Bandung', '62-55555555');

Dr'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('20', '77 Tiong ('6', 'Unilever', 'Surabaya', '62-66666666');

Bahru Dr'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('20', '96 ('7', 'NTU', 'Singapore', '65-12345678');

Queenstown St'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('21', '68 Eunos ('8', 'NUS', 'Singapore', '65-09999009');

St'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('22', '52 Simei ('9', 'Indofood', 'Indonesia', '62-99889988');

Dr'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('23', '14 ('10', 'Grape City', 'Myanmar', '99-99999999');

Commonwealth St'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('28', '9 Dover ('11', 'MIT', 'USA', '1-234567890');

St'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('29', '69 Jurong ('12', 'Singtel', 'Singapore', '65-65656565');

East St'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

insert into USERADDRESS (UserID, Address) values ('29', '73 Kallang ('13', 'Starhub', 'Singapore', '65-12367877');

Dr'); insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

('14', 'IBM', 'Singapore', '65-12313141');

-- data for USERPHONE insert into CORPORATION (CorpRegNo, Name, Address, Phone) values

('15', 'Microsoft', 'USA', '1-000099999');

insert into USERPHONE (UserID, Phone) values ('1', '94700033');

insert into USERPHONE (UserID, Phone) values ('3', '97167637'); -- data for ACTIVITY

insert into USERPHONE (UserID, Phone) values ('4', '87562333');

insert into USERPHONE (UserID, Phone) values ('4', '68018554'); insert into ACTIVITY (ActivityID, Type, Description, Date, Venue,

insert into USERPHONE (UserID, Phone) values ('4', '89183964'); Fee, CorpRegNo) values ('1', 'promotion', 'Promotion', '11/10/2007

2007-10-19 15
12:00:00 AM', 'NTU', NULL, '1'); Price) values ('S102', '2', '547.52', '2007/10/29 12:52', '50',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.17');

Fee, CorpRegNo) values ('2', 'seminar', 'Seminar', '12/12/2006 insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

12:00:00 AM', 'NTU', 200, '2'); Price) values ('S102', '2', '521.05', '2007/10/29 16:00', '50',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.16');

Fee, CorpRegNo) values ('3', 'promotion', 'Press Show', '10/9/2007 insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

12:00:00 AM', 'NTU', NULL, '3'); Price) values ('S103', '3', '573.23', '2007/10/30 13:55', '25',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.33');

Fee, CorpRegNo) values ('4', 'promotion', 'Superstar Press Release', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'12/3/2007 11:00:00 AM', 'SMU', NULL, '1'); Price) values ('S103', '3', '541.69', '2007/10/30 13:09', '25',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.24');

Fee, CorpRegNo) values ('5', 'seminar', 'Intermediate Lesson', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'2/3/2007 1:00:00 PM', 'NUS', 55, '14'); Price) values ('S103', '3', '571.26', '2007/10/29 13:55', '25',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.3');

Fee, CorpRegNo) values ('6', 'promotion', 'Gamble Night', '3/4/2005 insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

11:00:00 PM', 'SMU', NULL, '13'); Price) values ('S103', '3', '547.76', '2007/10/29 17:03', '25',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.27');

Fee, CorpRegNo) values ('7', 'promotion', 'Party', '5/6/2007 insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

11:22:00 AM', 'NUS', NULL, '13'); Price) values ('S104', '4', '572.49', '2007/10/30 15:23', '500',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.39');

Fee, CorpRegNo) values ('8', 'seminar', 'Java Tutorial', '3/3/2007 insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

1:00:00 PM', 'Suntec', 99, '10'); Price) values ('S104', '4', '586.11', '2007/10/30 14:37', '500',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.49');

Fee, CorpRegNo) values ('9', 'promotion', 'Big News', '4/4/2005 insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

11:00:00 PM', 'Marinabay', NULL, '7'); Price) values ('S104', '4', '590.19', '2007/10/29 15:23', '500',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.46');

Fee, CorpRegNo) values ('10', 'promotion', 'Party', '6/6/2007 insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

11:22:00 AM', 'East Coast', NULL, '4'); Price) values ('S104', '4', '597.87', '2007/10/29 18:31', '500',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.4');

Fee, CorpRegNo) values ('11', 'seminar', 'Using Solaris 10', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'4/3/2007 1:00:00 PM', 'Sentosa', 198, '3'); Price) values ('S105', '5', '610.86', '2007/10/30 11:23', '100',

insert into ACTIVITY (ActivityID, Type, Description, Date, Venue, '2.55');

Fee, CorpRegNo) values ('12', 'promotion', 'Dinner for Free', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'5/4/2005 11:00:00 PM', 'Changi', NULL, '1'); Price) values ('S105', '5', '616.56', '2007/10/30 10:37', '100',

'2.59');

-- data for BACKUP_STOCK insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

Price) values ('S105', '5', '607.34', '2007/10/29 11:23', '100',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '2.44');

Price) values ('S101', '1', '521.55', '2007/10/30 10:07', '100', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'2.05'); Price) values ('S105', '5', '585.79', '2007/10/29 14:31', '100',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '2.54');

Price) values ('S101', '1', '533.14', '2007/10/30 9:21', '100', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'2.04'); Price) values ('S106', '6', '634.73', '2007/10/30 11:51', '50',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '2.68');

Price) values ('S101', '1', '528.75', '2007/10/29 10:07', '100', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'2.17'); Price) values ('S106', '6', '624.9', '2007/10/30 11:05', '50',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '2.57');

Price) values ('S101', '1', '516.5', '2007/10/29 13:15', '100', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'2.17'); Price) values ('S106', '6', '613.71', '2007/10/29 11:51', '50',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '2.61');

Price) values ('S102', '2', '552.48', '2007/10/30 12:52', '50', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'2.11'); Price) values ('S106', '6', '618.49', '2007/10/29 14:59', '50',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '2.57');

Price) values ('S102', '2', '558.02', '2007/10/30 12:06', '50', insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot,

'2.11'); Price) values ('S107', '7', '623.16', '2007/10/30 14:51', '25',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '2.63');

2007-10-19 16
insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '25', '2.3');

Price) values ('S107', '7', '634.22', '2007/10/30 14:05', '25', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.62'); Lot, Price) values ('S104', '3', '4', '2.4', '2007/10/30 16:07',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '500', '2.4');

Price) values ('S107', '7', '639.54', '2007/10/29 14:51', '25', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.65'); Lot, Price) values ('S105', '5', '5', '2.5', '2007/10/30 12:07',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '100', '2.5');

Price) values ('S107', '7', '646.85', '2007/10/29 17:59', '25', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.63'); Lot, Price) values ('S106', '9', '6', '2.6', '2007/10/30 12:35',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '50', '2.6');

Price) values ('S108', '8', '658.72', '2007/10/30 14:54', '500', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.79'); Lot, Price) values ('S107', '13', '7', '2.7', '2007/10/30 15:35',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '25', '2.7');

Price) values ('S108', '8', '650.98', '2007/10/30 14:08', '500', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.89'); Lot, Price) values ('S108', '9', '8', '2.8', '2007/10/30 15:38',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '500', '2.8');

Price) values ('S108', '8', '642.76', '2007/10/29 14:54', '500', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.86'); Lot, Price) values ('S109', '3', '9', '2.9', '2007/10/30 11:28',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '100', '2.9');

Price) values ('S108', '8', '645.24', '2007/10/29 18:02', '500', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.76'); Lot, Price) values ('S110', '11', '10', '3', '2007/10/30 13:09',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '50', '3');

Price) values ('S109', '9', '693.91', '2007/10/30 10:44', '100', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.86'); Lot, Price) values ('S111', '11', '11', '3.1', '2007/10/30 11:38',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '25', '3.1');

Price) values ('S109', '9', '691', '2007/10/30 9:58', '100', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.85'); Lot, Price) values ('S112', '11', '12', '3.2', '2007/10/30 9:36',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '500', '3.2');

Price) values ('S109', '9', '695.98', '2007/10/29 10:44', '100', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.97'); Lot, Price) values ('S113', '1', '13', '3.3', '2007/10/30 12:43',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '100', '3.3');

Price) values ('S109', '9', '695.48', '2007/10/29 13:52', '100', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.84'); Lot, Price) values ('S114', '13', '14', '3.4', '2007/10/30 12:11',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '50', '3.4');

Price) values ('S110', '10', '684.1', '2007/10/30 12:25', '50', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.95'); Lot, Price) values ('S115', '5', '15', '3.5', '2007/10/30 12:50',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '25', '3.5');

Price) values ('S110', '10', '705.55', '2007/10/30 11:39', '50', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'2.93'); Lot, Price) values ('S116', '9', '16', '3.6', '2007/10/30 12:58',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '500', '3.6');

Price) values ('S110', '10', '713.3', '2007/10/29 12:25', '50', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'3'); Lot, Price) values ('S117', '7', '17', '3.7', '2007/10/30 12:21',

insert into BACKUP_STOCK (Symbol, IndexNo, Value, UpdateTime, Lot, '100', '3.7');

Price) values ('S110', '10', '691.62', '2007/10/29 15:33', '50', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'3'); Lot, Price) values ('S118', '5', '18', '3.8', '2007/10/30 14:57',

'50', '3.8');

-- data for STOCK insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

Lot, Price) values ('S119', '1', '19', '3.9', '2007/10/30 15:28',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '25', '3.9');

Lot, Price) values ('S101', '1', '1', '2.1', '2007/10/30 10:51', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'100', '2.1'); Lot, Price) values ('S120', '1', '20', '4', '2007/10/30 11:15',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '500', '4');

Lot, Price) values ('S102', '1', '2', '2.2', '2007/10/30 13:36', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'50', '2.2'); Lot, Price) values ('S121', '11', '21', '4.1', '2007/10/30 11:39',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '100', '4.1');

Lot, Price) values ('S103', '1', '3', '2.3', '2007/10/30 14:39', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

2007-10-19 17
Lot, Price) values ('S122', '9', '22', '4.2', '2007/10/30 10:32', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'50', '4.2'); Lot, Price) values ('S141', '5', '41', '6.1', '2007/10/30 11:12',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '100', '6.1');

Lot, Price) values ('S123', '1', '23', '4.3', '2007/10/30 12:00', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'25', '4.3'); Lot, Price) values ('S142', '13', '42', '6.2', '2007/10/30 14:56',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '50', '6.2');

Lot, Price) values ('S124', '5', '24', '4.4', '2007/10/30 14:39', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'500', '4.4'); Lot, Price) values ('S143', '11', '43', '6.3', '2007/10/30 12:05',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '25', '6.3');

Lot, Price) values ('S125', '3', '25', '4.5', '2007/10/30 13:55', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'100', '4.5'); Lot, Price) values ('S144', '13', '44', '6.4', '2007/10/30 15:21',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '500', '6.4');

Lot, Price) values ('S126', '3', '26', '4.6', '2007/10/30 13:44', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'50', '4.6'); Lot, Price) values ('S145', '13', '45', '6.5', '2007/10/30 16:11',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '100', '6.5');

Lot, Price) values ('S127', '13', '27', '4.7', '2007/10/30 10:21', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'25', '4.7'); Lot, Price) values ('S146', '1', '46', '6.6', '2007/10/30 15:27',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '50', '6.6');

Lot, Price) values ('S128', '11', '28', '4.8', '2007/10/30 11:39', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'500', '4.8'); Lot, Price) values ('S147', '3', '47', '6.7', '2007/10/30 15:45',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '25', '6.7');

Lot, Price) values ('S129', '3', '29', '4.9', '2007/10/30 13:04', insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

'100', '4.9'); Lot, Price) values ('S148', '11', '48', '6.8', '2007/10/30 13:51',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '500', '6.8');

Lot, Price) values ('S130', '7', '30', '5', '2007/10/30 9:43', '50',

'5'); -- data for PORTFOLIO

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime,

Lot, Price) values ('S131', '13', '31', '5.1', '2007/10/30 13:33', insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('1',

'25', '5.1'); '2', '1399');

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('2',

Lot, Price) values ('S132', '5', '32', '5.2', '2007/10/30 13:19', '4', '300');

'500', '5.2'); insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('3',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '7', '30010');

Lot, Price) values ('S133', '11', '33', '5.3', '2007/10/30 12:59', insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('4',

'100', '5.3'); '8', '3000');

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('5',

Lot, Price) values ('S134', '9', '34', '5.4', '2007/10/30 16:05', '9', '40000');

'50', '5.4'); insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('6',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '10', '500000');

Lot, Price) values ('S135', '11', '35', '5.5', '2007/10/30 14:28', insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('7',

'25', '5.5'); '11', '30000');

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('8',

Lot, Price) values ('S136', '7', '36', '5.6', '2007/10/30 15:39', '15', '30004');

'500', '5.6'); insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values ('9',

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, '16', '4919');

Lot, Price) values ('S137', '3', '37', '5.7', '2007/10/30 11:41', insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values

'100', '5.7'); ('10', '25', '4192');

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values

Lot, Price) values ('S138', '7', '38', '5.8', '2007/10/30 12:10', ('11', '26', '919');

'50', '5.8'); insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, ('12', '27', '100');

Lot, Price) values ('S139', '11', '39', '5.9', '2007/10/30 14:20', insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values

'25', '5.9'); ('13', '28', '5888');

insert into STOCK (Symbol, CorpRegNo, IndexNo, Value, UpdateTime, insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values

Lot, Price) values ('S140', '7', '40', '6', '2007/10/30 13:26', ('14', '29', '300');

'500', '6'); insert into PORTFOLIO (PortfolioID, UserID, CashAmount) values

2007-10-19 18
('15', '30', '10000'); insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice,

-- data for LIMITEDORDER TransactionQuantity) values ('14', '3', 'S103', '6', 'buy', '8',

'2007/10/27 14:01', 6, 6);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('1', '1', 'S101', '7', 'buy', '10', TransactionQuantity) values ('15', '3', 'S104', '5', 'buy', '10',

'2007/10/28 18:34', 4, 4); NULL, NULL, NULL);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('2', '1', 'S102', '6', 'buy', '200', TransactionQuantity) values ('16', '4', 'S105', '4', 'buy', '200',

'2007/10/27 9:27', 199, 199); NULL, NULL, NULL);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('3', '1', 'S103', '5', 'buy', '30', TransactionQuantity) values ('17', '4', 'S106', '3', 'buy', '30',

'2007/10/27 16:45', 29, 29); NULL, NULL, NULL);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('4', '2', 'S104', '4', 'buy', '1000', TransactionQuantity) values ('18', '4', 'S107', '2', 'buy', '1000',

'2007/10/29 12:59', 1000, 1000); NULL, NULL, NULL);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('5', '2', 'S105', '3', 'buy', '40', TransactionQuantity) values ('19', '4', 'S108', '7', 'sell', '40',

'2007/10/30 12:14', 35, 35); '2007/10/29 17:10', 40, 40);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('6', '2', 'S106', '2', 'buy', '500', TransactionQuantity) values ('20', '4', 'S109', '6', 'sell', '500',

'2007/10/27 17:14', 496, 496); '2007/10/30 10:12', 495, 495);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('7', '2', 'S107', '7', 'buy', '8', TransactionQuantity) values ('21', '4', 'S110', '5', 'sell', '8',

'2007/10/28 15:45', 4, 4); '2007/10/28 13:30', 2, 2);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('8', '2', 'S108', '6', 'buy', '10', TransactionQuantity) values ('22', '4', 'S111', '4', 'sell', '10',

'2007/10/30 11:54', 4, 4); '2007/10/30 16:19', 7, 7);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('9', '3', 'S109', '5', 'buy', '200', TransactionQuantity) values ('23', '4', 'S101', '3', 'sell', '200',

'2007/10/30 15:59', 194, 194); '2007/10/27 15:59', 197, 197);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('10', '3', 'S110', '4', 'buy', '30', TransactionQuantity) values ('24', '4', 'S102', '2', 'sell', '30',

'2007/10/28 17:19', 28, 28); '2007/10/27 12:45', 25, 25);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('11', '3', 'S111', '3', 'buy', '1000', TransactionQuantity) values ('25', '5', 'S103', '7', 'sell', '1000',

'2007/10/27 16:46', 993, 993); '2007/10/27 16:50', 995, 995);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('12', '3', 'S101', '2', 'buy', '40', TransactionQuantity) values ('26', '5', 'S104', '6', 'sell', '40',

'2007/10/28 9:25', 40, 40); '2007/10/27 14:32', 40, 40);

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol,

Price, Type, Quantity, TransactionTime, TransactionPrice, Price, Type, Quantity, TransactionTime, TransactionPrice,

TransactionQuantity) values ('13', '3', 'S102', '7', 'buy', '500', TransactionQuantity) values ('27', '5', 'S105', '5', 'sell', '500',

'2007/10/27 13:06', 498, 498); '2007/10/30 9:40', 498, 498);

2007-10-19 19
insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('2', 'S135',

Price, Type, Quantity, TransactionTime, TransactionPrice, '2604');

TransactionQuantity) values ('28', '5', 'S106', '4', 'sell', '8', insert into OWN (PortfolioID, Symbol, Quantity) values ('2', 'S136',

'2007/10/27 10:21', 3, 3); '300');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('2', 'S137',

Price, Type, Quantity, TransactionTime, TransactionPrice, '1580');

TransactionQuantity) values ('29', '5', 'S107', '3', 'sell', '10', insert into OWN (PortfolioID, Symbol, Quantity) values ('2', 'S143',

'2007/10/30 9:56', 8, 8); '2604');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('3', 'S124',

Price, Type, Quantity, TransactionTime, TransactionPrice, '3540');

TransactionQuantity) values ('30', '5', 'S108', '2', 'sell', '200', insert into OWN (PortfolioID, Symbol, Quantity) values ('3', 'S125',

'2007/10/29 14:49', 194, 194); '44');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('3', 'S126',

Price, Type, Quantity, TransactionTime, TransactionPrice, '2900');

TransactionQuantity) values ('31', '5', 'S109', '7', 'sell', '30', insert into OWN (PortfolioID, Symbol, Quantity) values ('3', 'S127',

'2007/10/29 14:09', 28, 28); '980');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('4', 'S122',

Price, Type, Quantity, TransactionTime, TransactionPrice, '524');

TransactionQuantity) values ('32', '5', 'S110', '6', 'sell', '1000', insert into OWN (PortfolioID, Symbol, Quantity) values ('4', 'S123',

'2007/10/28 11:28', 999, 999); '1364');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('4', 'S126',

Price, Type, Quantity, TransactionTime, TransactionPrice, '2324');

TransactionQuantity) values ('33', '5', 'S111', '5', 'sell', '40', insert into OWN (PortfolioID, Symbol, Quantity) values ('4', 'S136',

'2007/10/30 13:07', 35, 35); '1812');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('4', 'S143',

Price, Type, Quantity, TransactionTime, TransactionPrice, '3884');

TransactionQuantity) values ('34', '5', 'S101', '4', 'sell', '500', insert into OWN (PortfolioID, Symbol, Quantity) values ('5', 'S123',

NULL, NULL, NULL); '524');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('5', 'S124',

Price, Type, Quantity, TransactionTime, TransactionPrice, '1812');

TransactionQuantity) values ('35', '5', 'S102', '3', 'sell', '8', insert into OWN (PortfolioID, Symbol, Quantity) values ('5', 'S125',

NULL, NULL, NULL); '84');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('5', 'S126',

Price, Type, Quantity, TransactionTime, TransactionPrice, '300');

TransactionQuantity) values ('36', '6', 'S103', '2', 'sell', '10', insert into OWN (PortfolioID, Symbol, Quantity) values ('5', 'S127',

NULL, NULL, NULL); '2324');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('6', 'S124',

Price, Type, Quantity, TransactionTime, TransactionPrice, '1580');

TransactionQuantity) values ('37', '6', 'S104', '7', 'sell', '200', insert into OWN (PortfolioID, Symbol, Quantity) values ('6', 'S125',

NULL, NULL, NULL); '1812');

insert into LIMITEDORDER (LimitedOrderID, PortfolioID, Symbol, insert into OWN (PortfolioID, Symbol, Quantity) values ('6', 'S126',

Price, Type, Quantity, TransactionTime, TransactionPrice, '524');

TransactionQuantity) values ('38', '6', 'S105', '6', 'sell', '30', insert into OWN (PortfolioID, Symbol, Quantity) values ('6', 'S127',

NULL, NULL, NULL); '212');

insert into OWN (PortfolioID, Symbol, Quantity) values ('6', 'S143',

-- data for OWN '1364');

insert into OWN (PortfolioID, Symbol, Quantity) values ('1', 'S138', insert into OWN (PortfolioID, Symbol, Quantity) values ('7', 'S122',

'3212'); '300');

insert into OWN (PortfolioID, Symbol, Quantity) values ('1', 'S139', insert into OWN (PortfolioID, Symbol, Quantity) values ('7', 'S123',

'140'); '2604');

insert into OWN (PortfolioID, Symbol, Quantity) values ('1', 'S140', insert into OWN (PortfolioID, Symbol, Quantity) values ('7', 'S129',

'44'); '1164');

insert into OWN (PortfolioID, Symbol, Quantity) values ('2', 'S133', insert into OWN (PortfolioID, Symbol, Quantity) values ('7', 'S136',

'524'); '3540');

insert into OWN (PortfolioID, Symbol, Quantity) values ('2', 'S134', insert into OWN (PortfolioID, Symbol, Quantity) values ('8', 'S114',

'3540'); '1812');

2007-10-19 20
insert into OWN (PortfolioID, Symbol, Quantity) values ('8', 'S115', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'812'); 'S102', '1164');

insert into OWN (PortfolioID, Symbol, Quantity) values ('8', 'S116', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'980'); 'S103', '1164');

insert into OWN (PortfolioID, Symbol, Quantity) values ('8', 'S128', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'3540'); 'S104', '2060');

insert into OWN (PortfolioID, Symbol, Quantity) values ('9', 'S112', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'2604'); 'S105', '1580');

insert into OWN (PortfolioID, Symbol, Quantity) values ('9', 'S113', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'2060'); 'S106', '44');

insert into OWN (PortfolioID, Symbol, Quantity) values ('9', 'S121', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'812'); 'S107', '812');

insert into OWN (PortfolioID, Symbol, Quantity) values ('9', 'S132', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'812'); 'S108', '12');

insert into OWN (PortfolioID, Symbol, Quantity) values ('10', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S116', '3884'); 'S109', '212');

insert into OWN (PortfolioID, Symbol, Quantity) values ('10', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S117', '1812'); 'S110', '3540');

insert into OWN (PortfolioID, Symbol, Quantity) values ('10', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S118', '20'); 'S111', '44');

insert into OWN (PortfolioID, Symbol, Quantity) values ('10', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S119', '980'); 'S112', '212');

insert into OWN (PortfolioID, Symbol, Quantity) values ('10', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S120', '524'); 'S113', '404');

insert into OWN (PortfolioID, Symbol, Quantity) values ('11', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S113', '3540'); 'S114', '524');

insert into OWN (PortfolioID, Symbol, Quantity) values ('11', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S114', '524'); 'S115', '140');

insert into OWN (PortfolioID, Symbol, Quantity) values ('11', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S115', '3540'); 'S116', '3212');

insert into OWN (PortfolioID, Symbol, Quantity) values ('12', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S110', '980'); 'S117', '212');

insert into OWN (PortfolioID, Symbol, Quantity) values ('12', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S111', '3884'); 'S118', '2604');

insert into OWN (PortfolioID, Symbol, Quantity) values ('12', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S112', '1364'); 'S119', '44');

insert into OWN (PortfolioID, Symbol, Quantity) values ('12', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S132', '3212'); 'S120', '3212');

insert into OWN (PortfolioID, Symbol, Quantity) values ('13', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S108', '524'); 'S121', '660');

insert into OWN (PortfolioID, Symbol, Quantity) values ('13', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S109', '3884'); 'S122', '2604');

insert into OWN (PortfolioID, Symbol, Quantity) values ('13', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S121', '660'); 'S123', '2324');

insert into OWN (PortfolioID, Symbol, Quantity) values ('13', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S122', '2324'); 'S124', '2604');

insert into OWN (PortfolioID, Symbol, Quantity) values ('14', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S101', '2900'); 'S125', '3540');

insert into OWN (PortfolioID, Symbol, Quantity) values ('14', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S102', '20'); 'S126', '84');

insert into OWN (PortfolioID, Symbol, Quantity) values ('14', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S103', '404'); 'S127', '2060');

insert into OWN (PortfolioID, Symbol, Quantity) values ('14', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S104', '84'); 'S128', '20');

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', insert into OWN (PortfolioID, Symbol, Quantity) values ('15',

'S101', '84'); 'S129', '4620');

2007-10-19 21
insert into OWN (PortfolioID, Symbol, Quantity) values ('15', -- data for PARTICIPATE

'S130', '980'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('1', '2',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '1');

'S131', '140'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('1', '4',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '0');

'S132', '980'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('2', '4',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '1');

'S133', '404'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('2', '6',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '1');

'S134', '4620'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('2',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '20', '0');

'S135', '1812'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('3',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '30', '1');

'S136', '660'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('3',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '10', '1');

'S137', '660'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('3',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '22', '0');

'S138', '2900'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('4',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '22', '1');

'S139', '140'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('4', '2',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '1');

'S140', '3540'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('4', '1',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '1');

'S141', '2604'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('5', '6',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '1');

'S142', '44'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('6', '7',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '0');

'S143', '3884'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('6', '8',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '0');

'S144', '812'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('7', '9',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '0');

'S145', '3212'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('7',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '10', '0');

'S146', '524'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('7',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '11', '1');

'S147', '3540'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('7',

insert into OWN (PortfolioID, Symbol, Quantity) values ('15', '17', '1');

'S148', '812'); insert into PARTICIPATE (ActivityID, UserID, Paid) values ('7',

'18', '1');

2007-10-19 22

You might also like