Custom report from SQL query Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm...
Vertical ranges of Column Plots in 12
New Order #6: Easter Egg
How could a hydrazine and N2O4 cloud (or it's reactants) show up in weather radar?
NIntegrate on a solution of a matrix ODE
Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?
Did pre-Columbian Americans know the spherical shape of the Earth?
How can I prevent/balance waiting and turtling as a response to cooldown mechanics
Proving that any solution to the differential equation of an oscillator can be written as a sum of sinusoids.
Can two people see the same photon?
Was the pager message from Nick Fury to Captain Marvel unnecessary?
"Destructive power" carried by a B-52?
My mentor says to set image to Fine instead of RAW — how is this different from JPG?
Did any compiler fully use 80-bit floating point?
Pointing to problems without suggesting solutions
Are there any irrational/transcendental numbers for which the distribution of decimal digits is not uniform?
Can gravitational waves pass through a black hole?
French equivalents of おしゃれは足元から (Every good outfit starts with the shoes)
Noise in Eigenvalues plot
malloc in main() or malloc in another function: allocating memory for a struct and its members
Dinosaur Word Search, Letter Solve, and Unscramble
Understanding piped commands in GNU/Linux
Inverse square law not accurate for non-point masses?
Should man-made satellites feature an intelligent inverted "cow catcher"?
draw a pulley system
Custom report from SQL query
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?display a sql query being generatedGet full list of categories using sqlModify SQL query to also get number of times orderedMagento Direct SQL New vs Existing CustomersHow to pass a complete SQL query to the model?Number of orders by categorysql query to get Products price, sku, product_id, description and url to pictureSort Product Collection By Event Date Custom fieldSQL Query Newsletter subscription status with custom tablesHow to customize 'Order Total Report' (REPORTS > Customers > Order Total) in magento 2.2.6
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I want to get order total
of the month January 2019
for complete orders
I need to know tables related to this query
, or if someone can share query that would be great.
magento2 sql custom-reports
add a comment |
I want to get order total
of the month January 2019
for complete orders
I need to know tables related to this query
, or if someone can share query that would be great.
magento2 sql custom-reports
order total, you mean the total number of orders for year 2019 or the total sum of amount of all the order for the specific month?
– magefms
Mar 26 at 9:57
I need sum amount
– Muhammad Anas
Mar 26 at 10:03
add a comment |
I want to get order total
of the month January 2019
for complete orders
I need to know tables related to this query
, or if someone can share query that would be great.
magento2 sql custom-reports
I want to get order total
of the month January 2019
for complete orders
I need to know tables related to this query
, or if someone can share query that would be great.
magento2 sql custom-reports
magento2 sql custom-reports
edited Mar 26 at 9:49
Muhammad Hasham
2,9612931
2,9612931
asked Mar 26 at 9:24
Muhammad AnasMuhammad Anas
7241321
7241321
order total, you mean the total number of orders for year 2019 or the total sum of amount of all the order for the specific month?
– magefms
Mar 26 at 9:57
I need sum amount
– Muhammad Anas
Mar 26 at 10:03
add a comment |
order total, you mean the total number of orders for year 2019 or the total sum of amount of all the order for the specific month?
– magefms
Mar 26 at 9:57
I need sum amount
– Muhammad Anas
Mar 26 at 10:03
order total, you mean the total number of orders for year 2019 or the total sum of amount of all the order for the specific month?
– magefms
Mar 26 at 9:57
order total, you mean the total number of orders for year 2019 or the total sum of amount of all the order for the specific month?
– magefms
Mar 26 at 9:57
I need sum amount
– Muhammad Anas
Mar 26 at 10:03
I need sum amount
– Muhammad Anas
Mar 26 at 10:03
add a comment |
2 Answers
2
active
oldest
votes
Your questions seems double meaning for me, so here I'll post my answer assuming:
You want to get the Total Numbers of order for the specific month, below query should work
SELECT count(entity_id) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
You want to get the total sum amount you can try this (This will filter only order that are completed):
SELECT sum(base_grand_total) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
1
It worked. Thanks
– Muhammad Anas
Mar 26 at 10:10
add a comment |
Here is query which will give you order total of completed order's for month jan 2019:
SELECT sum(base_grand_total) FROM sales_order
WHERE created_at >='2018-12-31 23:59:59.000' AND created_at <= '2019-02-31
23:59:59.000' AND status='complete'
Thanks Mohit, but it is showing warning that incorrect datetime format
– Muhammad Anas
Mar 26 at 10:03
Thanks for answer. +1
– Muhammad Anas
Mar 26 at 10:48
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267395%2fcustom-report-from-sql-query%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your questions seems double meaning for me, so here I'll post my answer assuming:
You want to get the Total Numbers of order for the specific month, below query should work
SELECT count(entity_id) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
You want to get the total sum amount you can try this (This will filter only order that are completed):
SELECT sum(base_grand_total) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
1
It worked. Thanks
– Muhammad Anas
Mar 26 at 10:10
add a comment |
Your questions seems double meaning for me, so here I'll post my answer assuming:
You want to get the Total Numbers of order for the specific month, below query should work
SELECT count(entity_id) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
You want to get the total sum amount you can try this (This will filter only order that are completed):
SELECT sum(base_grand_total) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
1
It worked. Thanks
– Muhammad Anas
Mar 26 at 10:10
add a comment |
Your questions seems double meaning for me, so here I'll post my answer assuming:
You want to get the Total Numbers of order for the specific month, below query should work
SELECT count(entity_id) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
You want to get the total sum amount you can try this (This will filter only order that are completed):
SELECT sum(base_grand_total) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
Your questions seems double meaning for me, so here I'll post my answer assuming:
You want to get the Total Numbers of order for the specific month, below query should work
SELECT count(entity_id) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
You want to get the total sum amount you can try this (This will filter only order that are completed):
SELECT sum(base_grand_total) FROM sales_order where state='complete' and status='complete' and month(created_at) = '01' and year(created_at) = '2019';
answered Mar 26 at 10:04
magefmsmagefms
2,8052528
2,8052528
1
It worked. Thanks
– Muhammad Anas
Mar 26 at 10:10
add a comment |
1
It worked. Thanks
– Muhammad Anas
Mar 26 at 10:10
1
1
It worked. Thanks
– Muhammad Anas
Mar 26 at 10:10
It worked. Thanks
– Muhammad Anas
Mar 26 at 10:10
add a comment |
Here is query which will give you order total of completed order's for month jan 2019:
SELECT sum(base_grand_total) FROM sales_order
WHERE created_at >='2018-12-31 23:59:59.000' AND created_at <= '2019-02-31
23:59:59.000' AND status='complete'
Thanks Mohit, but it is showing warning that incorrect datetime format
– Muhammad Anas
Mar 26 at 10:03
Thanks for answer. +1
– Muhammad Anas
Mar 26 at 10:48
add a comment |
Here is query which will give you order total of completed order's for month jan 2019:
SELECT sum(base_grand_total) FROM sales_order
WHERE created_at >='2018-12-31 23:59:59.000' AND created_at <= '2019-02-31
23:59:59.000' AND status='complete'
Thanks Mohit, but it is showing warning that incorrect datetime format
– Muhammad Anas
Mar 26 at 10:03
Thanks for answer. +1
– Muhammad Anas
Mar 26 at 10:48
add a comment |
Here is query which will give you order total of completed order's for month jan 2019:
SELECT sum(base_grand_total) FROM sales_order
WHERE created_at >='2018-12-31 23:59:59.000' AND created_at <= '2019-02-31
23:59:59.000' AND status='complete'
Here is query which will give you order total of completed order's for month jan 2019:
SELECT sum(base_grand_total) FROM sales_order
WHERE created_at >='2018-12-31 23:59:59.000' AND created_at <= '2019-02-31
23:59:59.000' AND status='complete'
answered Mar 26 at 9:54
Mohit chauhanMohit chauhan
576212
576212
Thanks Mohit, but it is showing warning that incorrect datetime format
– Muhammad Anas
Mar 26 at 10:03
Thanks for answer. +1
– Muhammad Anas
Mar 26 at 10:48
add a comment |
Thanks Mohit, but it is showing warning that incorrect datetime format
– Muhammad Anas
Mar 26 at 10:03
Thanks for answer. +1
– Muhammad Anas
Mar 26 at 10:48
Thanks Mohit, but it is showing warning that incorrect datetime format
– Muhammad Anas
Mar 26 at 10:03
Thanks Mohit, but it is showing warning that incorrect datetime format
– Muhammad Anas
Mar 26 at 10:03
Thanks for answer. +1
– Muhammad Anas
Mar 26 at 10:48
Thanks for answer. +1
– Muhammad Anas
Mar 26 at 10:48
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267395%2fcustom-report-from-sql-query%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
order total, you mean the total number of orders for year 2019 or the total sum of amount of all the order for the specific month?
– magefms
Mar 26 at 9:57
I need sum amount
– Muhammad Anas
Mar 26 at 10:03