Comments (4)
It´s a bit different what you are proposing.
What I did for UK, FR, and AUS is:
calculating the share of
- orders that have been shipped using shipment feature, i.e. orders with shipment state of the order =
shipped
from - total number of order that were completed and could have used the shipment feature, i.e. order with shipment state of the order =
shipped
and payment state of the order= paid
orcredit owed
from inception-pipe.
Results for UK, FR, AUS in here:
https://docs.google.com/spreadsheets/d/1HKtquVdIovSPnQCkW9husnJcWk3p2YOOBX65y4JboBc/edit?usp=sharing
Query:
1.To identify hubs that using shipment state = shipped
the most per instance
(for orders created: Jan 1st 2021 - Jul 15th 2021, to exclude orders that are still in progress)
SELECT "public"."spree_orders"."distributor_id" AS "distributor_id", count(*) AS "count"
FROM "public"."spree_orders"
WHERE ("public"."spree_orders"."shipment_state" = 'shipped'
AND "public"."spree_orders"."state" = 'complete' AND ("public"."spree_orders"."created_at" >= timestamp with time zone '2021-01-01 00:00:00.000Z' AND "public"."spree_orders"."created_at" < timestamp with time zone '2021-07-16 00:00:00.000Z'))
GROUP BY "public"."spree_orders"."distributor_id"
ORDER BY "count" DESC, "public"."spree_orders"."distributor_id" ASC
- And then, to check shipped orders against total # of completed orders with Payment State = paid or credit owed for each distributors (identified in the previous step)
SELECT "public"."spree_orders"."distributor_id" AS "distributor_id", count(*) AS "count"
FROM "public"."spree_orders"
WHERE ("public"."spree_orders"."state" = 'complete'
AND ("public"."spree_orders"."created_at" >= timestamp with time zone '2021-01-01 00:00:00.000Z' AND "public"."spree_orders"."created_at" < timestamp with time zone '2021-07-16 00:00:00.000Z') AND ("public"."spree_orders"."payment_state" = 'paid'
OR "public"."spree_orders"."payment_state" = 'credit_owed') AND "public"."spree_orders"."distributor_id" = 2584)
GROUP BY "public"."spree_orders"."distributor_id"
ORDER BY "public"."spree_orders"."distributor_id" ASC
@andrewpbrett if you could run them for US and CAN and send me as csv or paste results in the sheet in respective tabs would be great!
from inception-pipe.
Maybe using shipment states could provide the info we need. If understand correctly we're trying to access the turnover of
orders which can be shipped
(shipment_state=ready) -> shipped orders
(shipment_state=shipped)
This would be (1.) / (2.) from the queries below:
1. Count of orders, from all Enterprises which use this feature (shipment_state=shipped) :
SELECT "public"."spree_orders"."distributor_id" AS "distributor_id", count(*) AS "count"
FROM "public"."spree_orders"
WHERE ("public"."spree_orders"."shipment_state" = 'shipped'
AND ("public"."spree_orders"."created_at" >= timestamp with time zone '2021-01-01 00:00:00.000Z' AND "public"."spree_orders"."created_at" < timestamp with time zone '2021-07-16 00:00:00.000Z'))
GROUP BY "public"."spree_orders"."distributor_id"
ORDER BY "count" DESC, "public"."spree_orders"."distributor_id" ASC
2. Count of orders which have shipment_state=ready, listed by the enterprises above:
SELECT "public"."spree_orders"."distributor_id" AS "distributor_id", count(*) AS "count"
FROM "public"."spree_orders"
WHERE ("public"."spree_orders"."shipment_state" = 'ready'
AND ("public"."spree_orders"."created_at" >= timestamp with time zone '2021-01-01 00:00:00.000Z' AND "public"."spree_orders"."created_at" < timestamp with time zone '2021-07-16 00:00:00.000Z') AND "public"."spree_orders"."distributor_id" IN (enteprise_id1, enteprise_id2, enteprise_id3, ...))
GROUP BY "public"."spree_orders"."distributor_id"
ORDER BY "count" DESC, "public"."spree_orders"."distributor_id" ASC
in which IN (enteprise_id1, enteprise_id2, enteprise_id3, ...)
is the list of enterprises obtained in 1. What do you think @jaycmb ?
from inception-pipe.
Queries for US & CAN run and documented in here as well by @filipefurtad0 🙏:skin-tone-2:
https://docs.google.com/spreadsheets/d/1HKtquVdIovSPnQCkW9husnJcWk3p2YOOBX65y4JboBc/edit?usp=sharing
So Hubs for all 5 instances that are using the shipment states are identified and can be contacted in a next step by instance managers or customer support to investigate whether and how they use shipment states.
from inception-pipe.
Related Issues (20)
- Welcome new Product board?
- A new application process for delivery team
- Stripe SCA Phase 3: Remove Stripe Connect
- Spike: investigate performance improvements HOT 2
- Welcome new designers board HOT 4
- Investigate product analytics for new checkout process
- Core/Non Core Instances
- Pipe, Features and Funds
- Break down Product List Epic into components HOT 1
- Usertesting - Checkout split new design HOT 3
- MCFE - Validation of Focus Problems UX research
- Enable MCFE to adjust orders
- Enable MCFE to notify producers about orders
- Provide delivery reports to the MCFE HOT 1
- Provide MCFE order details for packing HOT 1
- Enable MCFE to manage stock info from suppliers HOT 1
- Split Checkout HOT 1
- Product List UI Uplift HOT 1
- Investigate Payment method validation for checkout process HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inception-pipe.