This file contains hidden or 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 | |
| order_id | |
| ,max(price) | |
| from {{raw.e_commerce_sample.webshop_order_line}} | |
| group by order_id |
This file contains hidden or 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 | |
| order_id, | |
| max(price) | |
| from | |
| {{raw.e_commerce_sample.webshop_order_line}} |
This file contains hidden or 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 | |
| max(price) | |
| from | |
| {{raw.e_commerce_sample.webshop_order_line}} |
This file contains hidden or 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 | |
| order_id | |
| from | |
| {{raw.e_commerce_sample.webshop_order_line}} |
This file contains hidden or 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 | |
| order_id, | |
| sum(quantity * price) as total_revenue_per_order | |
| from | |
| {{raw.e_commerce_sample.webshop_order_line}} | |
| group by | |
| order_id | |
| order by | |
| total_revenue_per_order desc |
This file contains hidden or 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 | |
| count(id) as orders_received, | |
| extract( | |
| month | |
| from | |
| ( | |
| parse_date('%d / %m / %Y', received_at) | |
| ) | |
| ) as recived_at_month, | |
| extract( |
This file contains hidden or 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 | |
| count(id) as orders_received, | |
| extract( | |
| month | |
| from | |
| ( | |
| parse_date('%d / %m / %Y', received_at) | |
| ) | |
| ) as recived_at_month, | |
| extract( |
This file contains hidden or 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 | |
| count(id) as orders_received, | |
| extract( | |
| year | |
| from | |
| ( | |
| parse_date('%d / %m / %Y', received_at) | |
| ) | |
| ) as recived_at_year | |
| from |
This file contains hidden or 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 | |
| customer_id, | |
| count(id) as number_of_orders | |
| from | |
| {{raw.e_commerce_sample.webshop_order}} | |
| group by | |
| customer_id |
This file contains hidden or 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 | |
| max(price * quantity) as highest_order_line_value | |
| from | |
| {{raw.e_commerce_sample.webshop_order_line}} |
NewerOlder