criteria

  • Thread starter Thread starter maya
  • Start date Start date
M

maya

hallo all,

i have table Transaction(ID,Date,Costumer,product
number,Sale amount). Now i want to make query from that
table base on this criteria;
exclude ONLY the transactions if the total of it BY same
costumer,same product number have Sale amount > $50k

how would my query be?please help

THT,
maya
 
im trying to do it by using crosstab query as ID,Product
number using row heading, Costumer using column heading
and Sale amount using value. later on i sum up all sale
amount on its product number row.

now how do i exclude it from original table?or is that any
shorter way to deal with it?
 
by the way below is the sql for the crosstab query. i can
see some of it have sum of Sale amouont>50k. now i want to
exclude those transaction related to it away from my
original table


TRANSFORM Sum(Transaction.[Sale Amount]) AS [SumOfSale
Amount]
SELECT Transaction.[Costumer]
FROM [Transaction]
GROUP BY Transaction.[Costumer]
PIVOT Transaction.[Product number];

im sorry to repost this many time bcos i couldnt find the
way to edit my previous post

THT,
maya
 
Back
Top