Created
April 4, 2023 23:29
-
-
Save beabetterdevv/2c8e5f89cd812b06929d7306a750c01b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
Item.OrderId.S as OrderId, | |
Item.CustomerId.S as CustomerId, | |
Item.OrderDate.S as OrderDate, | |
Item.State.S as State, | |
Item.TotalAmount.N as TotalAmount, | |
Item.CancelledReasons.L as CancelledReasons, | |
Item.CancellationMetadata.M as CancellationMetadata | |
FROM data; | |
SELECT | |
Item.OrderId.S as OrderId, | |
Item.CustomerId.S as CustomerId, | |
Item.OrderDate.S as OrderDate, | |
Item.State.S as State, | |
Item.TotalAmount.N as TotalAmount, | |
Item.CancelledReasons.L as CancelledReasons, | |
Item.CancellationMetadata.M as CancellationMetadata | |
FROM data | |
WHERE Item.CustomerId.S = 'CID-100' | |
SELECT | |
Item.OrderId.S as OrderId, | |
Item.CustomerId.S as CustomerId, | |
Item.OrderDate.S as OrderDate, | |
Item.State.S as State, | |
Item.TotalAmount.N as TotalAmount, | |
Item.CancelledReasons.L as CancelledReasons, | |
Item.CancellationMetadata.M as CancellationMetadata | |
FROM data | |
WHERE Item.CustomerId.S = 'CID-100' AND Item.OrderId.S = '5' | |
SELECT Item.CancellationMetadata.M.canceldate.S as CancelData from data; | |
SELECT transform(Item.CancelledReasons.L, i -> i.S) AS CancelledReasons FROM data | |
WHERE ( | |
contains(transform(Item.CancelledReasons.L, i -> i.S), 'ITEM_DAMAGED') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment