Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have SQL tables with Order and Invoice data but now I wanna link external data to the order data.
I think I need to use intervalmatch but I need to make sure that CustomerType and SegmentId column matching also.
I wanna add the external markups as Invoicelines to each order.
Any help are appreciated!
OrderID | OrderDate | CustomerType | SegmentID |
---|---|---|---|
1234 | 2016-05-13 | Organic | 4 |
InvoiceLineID | Name | Code | Price | Cost | OrderID |
---|---|---|---|---|---|
132234 | Samsung TV | JSDKDY | 1000 | 800 | 1234 |
23221 | Panasonic DVD | PKKDLJ | 300 | 275 | 1234 |
External markups:
FromDate | ToDate | CustomerType | SegmentID | Name | Code | Price | Cost | |
---|---|---|---|---|---|---|---|---|
2016-01-01 | 2016-12-31 | Organic | 4 | Kickback | KSSYBJ | 25 | 0 | |
2016-01-01 |
| Referal | 2 | Kickback | UIREKK | 10 | 0 |
Would you be able to share what you expected output is?
Thanks for trying to help.
I wanna add the markup item to the current order as a invoice line.
InvoiceLineID | Name | Code | Price | Cost | OrderID |
---|---|---|---|---|---|
132234 | Samsung TV | JSDKDY | 1000 | 800 | 1234 |
23221 | Panasonic DVD | PKKDLJ | 300 | 275 | 1234 |
Kickback | KSSYBJ | 25 | 0 | 1234 |
Hi,
I wanna be able to OrderID and Product Name as a dimension and use SUM(Price) for example as a measure.
Anyone who can point me in the right direction?