• What's your favorite mod?

    Interested in seeing what everyone has owned/tried!

    View thread

Lounging By the Beach

Status
Not open for further replies.

SilverBear

Super Member
ECF Veteran
Verified Member
Sep 30, 2009
351
54,535
This is really going to bore the other beachgoers. So go ahead and skip reading this.

OK... it's a "product cross-sell" problem. I need to know what products people buy together. And my solution is working MOST of the time.

Say somebody buys 2 products in 1 order. That is 1 order, two items. I create 2 records... one with Product A as "Product 1" and Product B as "Product 2"... the other record has Product B as "Product 1" and Product A as "Product 2".

If they bought 3 items, I end up with six records... all combinations of Products A, B and C.

And this works for my purpose.

HOWEVER, there are rogue occasions the query does NOT work. A 2-product purchase only yields ONE record. And it only happens with one particular product. But not EVERY time.
 

CES

optimistic cynic
ECF Veteran
Verified Member
Jan 25, 2010
22,181
60,980
Birmingham, Al
Don't you just love the red army choir in the background. I laughed like crazy the first time i saw it.

The miami option is long gone. I like it here now- and i like what i do. that's why i stayed here instead of moving back to miami for a postdoc.


Bear- that actually made sense to me. trying to figure out the puzzle would need a glass of wine (or 3) to deal with though.
 

JustaGuy

Vaping Master
ECF Veteran
Jul 19, 2011
3,483
91,178
Beyond The Sea
This is really going to bore the other beachgoers. So go ahead and skip reading this.

OK... it's a "product cross-sell" problem. I need to know what products people buy together. And my solution is working MOST of the time.

Say somebody buys 2 products in 1 order. That is 1 order, two items. I create 2 records... one with Product A as "Product 1" and Product B as "Product 2"... the other record has Product B as "Product 1" and Product A as "Product 2".

If they bought 3 items, I end up with six records... all combinations of Products A, B and C.

And this works for my purpose.

HOWEVER, there are rogue occasions the query does NOT work. A 2-product purchase only yields ONE record. And it only happens with one particular product. But not EVERY time.

Not getting into too much detail, in a relational database, each order would compose of one to many "detail lines", each representing one item or product. I assume the purchase records were created, 2 detail lines, 2 records in a table. That's important. If that was the case, then it's just the query parameters.
 

starrynight

Ultra Member
ECF Veteran
Nov 28, 2010
1,881
32,773
the galaxy
Not getting into too much detail, in a relational database, each order would compose of one to many "detail lines", each representing one item or product. I assume the purchase records were created, 2 detail lines, 2 records in a table. That's important. If that was the case, then it's just the query parameters.

Yeah I was gonna say that too but JaG beat me :unsure:
 

JustaGuy

Vaping Master
ECF Veteran
Jul 19, 2011
3,483
91,178
Beyond The Sea
Don't you just love the red army choir in the background. I laughed like crazy the first time i saw it.

The miami option is long gone. I like it here now- and i like what i do. that's why i stayed here instead of moving back to miami for a postdoc.


Bear- that actually made sense to me. trying to figure out the puzzle would need a glass of wine (or 3) to deal with though.

Yeah, see how well known that classic is? Perhaps they're dying to move to Bammy? :laugh:

But don't you miss the weather and ocean?
 

SilverBear

Super Member
ECF Veteran
Verified Member
Sep 30, 2009
351
54,535
Yes... the raw data file from the financial system has 1 record per product. There can be more than 1 product in an order. And the query runs against that data to create a record for every combination. 2 items yield 4 records, 3 make 6, etc. 1 item yields 1 record.

But not every time when a certain item is involved... and then it's sporadic.

This is not beach material... I shall leave everybody alone!
 

JustaGuy

Vaping Master
ECF Veteran
Jul 19, 2011
3,483
91,178
Beyond The Sea
Yes... the raw data file from the financial system has 1 record per product. There can be more than 1 product in an order. And the query runs against that data to create a record for every combination. 2 items yield 4 records, 3 make 6, etc. 1 item yields 1 record.

But not every time when a certain item is involved... and then it's sporadic.

This is not beach material... I shall leave everybody alone!

So your query creates new records in a result table, and the additional record is missing?

Two suggestions:

1. make a copy of that query and make it select/normal query instead, do not create records, just see what it gets.
2. check query setting for "unique records". It may think it's a duplicate and not create it again.

But I'd still look into search parameters using #1 above. When in doubt, deconstruct...:)
 

CES

optimistic cynic
ECF Veteran
Verified Member
Jan 25, 2010
22,181
60,980
Birmingham, Al
Home is here for the foreseeable future- at least another few years til i get vested in the retirement system. My friends and support system are here too.

Bear, you don't have to leave...I'm curious. anyway you can work on the beach


(this is so cool...my laptop froze and it's restarting, but in the meantime i switched to my tablet...and it restores my post ^^^)
 
Status
Not open for further replies.

Users who are viewing this thread