E
elsenorjose
I have a table with the following structure:
user_id
transaction_type
revenue_amt
items_sold
I have multiple rows for each user_id with a trans_type code and the
revenue they generated and number of items they sold per
transaction_type.
What I need to do is roll up the revenue for each user into one summary
row. I want to sum the revenue and items_sold for each of the different
trans_types into 2 buckets; 'full' and 'discount'. What I would end up
with is one row per user with the sum of revenue and sum of items for
'full' and 'discount' types:
user_id
full_revenue
discount_revenue
full_items_sold
discount_items_sold
I'm not very good with the IIf statement and I've been trying to use it
but end up with a column called 'Expr1' with 'Full' or 'Discount' in
it.
HELP!
Thanks!
user_id
transaction_type
revenue_amt
items_sold
I have multiple rows for each user_id with a trans_type code and the
revenue they generated and number of items they sold per
transaction_type.
What I need to do is roll up the revenue for each user into one summary
row. I want to sum the revenue and items_sold for each of the different
trans_types into 2 buckets; 'full' and 'discount'. What I would end up
with is one row per user with the sum of revenue and sum of items for
'full' and 'discount' types:
user_id
full_revenue
discount_revenue
full_items_sold
discount_items_sold
I'm not very good with the IIf statement and I've been trying to use it
but end up with a column called 'Expr1' with 'Full' or 'Discount' in
it.
HELP!
Thanks!