Skip to content

Instantly share code, notes, and snippets.

View paul-uz's full-sized avatar
🖥️
sudo rm -rf

Paul Canning paul-uz

🖥️
sudo rm -rf
  • Urban Zoo
  • Liverpool
  • 21:20 (UTC +01:00)
View GitHub Profile
@jed
jed / deploy.sh
Last active April 24, 2024 15:45
Using AWS CloudFormation to deploy an edge lambda
#!/bin/sh
aws cloudformation deploy \
--template-file stack.yaml \
--stack-name edge-lambda-test \
--capabilities CAPABILITY_IAM \
--parameter-overrides Nonce=$RANDOM
@webdawe
webdawe / coutrywise_report.sql
Last active December 29, 2022 14:15
Query for retrieving country wise sales report from Magento Database
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