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
#!/bin/sh | |
aws cloudformation deploy \ | |
--template-file stack.yaml \ | |
--stack-name edge-lambda-test \ | |
--capabilities CAPABILITY_IAM \ | |
--parameter-overrides Nonce=$RANDOM |
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
SET @fromDate = DATE_SUB(NOW(), INTERVAL 1 YEAR); | |
SELECT country_id, count(*) as total_orders,SUM(s.grand_total) | |
FROM `sales_flat_order_address` a | |
INNER JOIN sales_flat_order s ON s.entity_id = a.parent_id | |
WHERE s.created_at >= @fromDate | |
AND a.address_type = 'shipping' | |
GROUP BY country_id | |
ORDER BY total_orders DESC |