Magento get list of sales/revenue per brand/manufacturerDashboard's Lifetime Sales And Total Order Revenue are displaying different values ? Any Solutions?Magento Sales Reports not UpdatingLow Stock Report: How to Add a Manufacturer/Brand column?Filters on custom product listing page not workingSales Revenue per product from sales/orderHow to get Lifetime Sales Data in Magento 2Magento Showing incorrect sales order reportHow get the total revenue of a productShop by Brand/Manufacturer custom URL in M1How to change the field Product Brand to Manufacturer?

How to make readers know that my work has used a hidden constraint?

Question about partial fractions with irreducible quadratic factors

Running a subshell from the middle of the current command

Is going from continuous data to categorical always wrong?

Potentiometer like component

How do anti-virus programs start at Windows boot?

Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements

Can "semicircle" be used to refer to a part-circle that is not a exact half-circle?

How to deal with a cynical class?

Can infringement of a trademark be pursued for using a company's name in a sentence?

Confusion with the nameplate of an induction motor

Sword in the Stone story where the sword was held in place by electromagnets

Am I not good enough for you?

Life insurance that covers only simultaneous/dual deaths

How is the Swiss post e-voting system supposed to work, and how was it wrong?

Rejected in 4th interview round citing insufficient years of experience

Counter-example to the existence of left Bousfield localization of combinatorial model category

Giving Plot options defined outside of the Plot expression

If Invisibility ends because the original caster casts a non-concentration spell, does Invisibility also end on other targets of the original casting?

Why don't MCU characters ever seem to have language issues?

Playing ONE triplet (not three)

Are there situations where a child is permitted to refer to their parent by their first name?

What is the definition of "Natural Selection"?

Can the druid cantrip Thorn Whip really defeat a water weird this easily?



Magento get list of sales/revenue per brand/manufacturer


Dashboard's Lifetime Sales And Total Order Revenue are displaying different values ? Any Solutions?Magento Sales Reports not UpdatingLow Stock Report: How to Add a Manufacturer/Brand column?Filters on custom product listing page not workingSales Revenue per product from sales/orderHow to get Lifetime Sales Data in Magento 2Magento Showing incorrect sales order reportHow get the total revenue of a productShop by Brand/Manufacturer custom URL in M1How to change the field Product Brand to Manufacturer?













2















How can one get a quick list of sales/revenue per brand/manufacturer in Magento?



Something like



Brand Sales (minus returned/cancel)
brand 1 100 euro
brand 2 200 euro


Difficulty I see is: grouping by a product attribute. Correcting for returned and cancelled. And one could add a filter over time (from date - to date)



Any help appreciated










share|improve this question




























    2















    How can one get a quick list of sales/revenue per brand/manufacturer in Magento?



    Something like



    Brand Sales (minus returned/cancel)
    brand 1 100 euro
    brand 2 200 euro


    Difficulty I see is: grouping by a product attribute. Correcting for returned and cancelled. And one could add a filter over time (from date - to date)



    Any help appreciated










    share|improve this question


























      2












      2








      2








      How can one get a quick list of sales/revenue per brand/manufacturer in Magento?



      Something like



      Brand Sales (minus returned/cancel)
      brand 1 100 euro
      brand 2 200 euro


      Difficulty I see is: grouping by a product attribute. Correcting for returned and cancelled. And one could add a filter over time (from date - to date)



      Any help appreciated










      share|improve this question
















      How can one get a quick list of sales/revenue per brand/manufacturer in Magento?



      Something like



      Brand Sales (minus returned/cancel)
      brand 1 100 euro
      brand 2 200 euro


      Difficulty I see is: grouping by a product attribute. Correcting for returned and cancelled. And one could add a filter over time (from date - to date)



      Any help appreciated







      attributes sales reports






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 20 '16 at 7:43









      Fabian Schmengler

      54.9k21134350




      54.9k21134350










      asked Sep 19 '16 at 10:05









      snh_nlsnh_nl

      2,8931046104




      2,8931046104




















          1 Answer
          1






          active

          oldest

          votes


















          3














          We've spent some time and that is the query we got:



          SELECT 
          data_table.value AS Brand, SUM(data_table.amount) AS Sales
          FROM
          (SELECT
          EAOV.value,
          (SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded) AS amount
          FROM
          eav_attribute_option AS EAO
          INNER JOIN eav_attribute_option_value AS EAOV ON EAO.option_id = EAOV.option_id
          AND EAO.attribute_id = (SELECT
          attribute_id
          FROM
          eav_attribute
          WHERE
          attribute_code = 'manufacturer')
          INNER JOIN catalog_product_entity_int AS CPEI ON CPEI.value = EAOV.option_id
          INNER JOIN sales_flat_order_item AS SFOI ON CPEI.entity_id = SFOI.product_id
          AND SFOI.price > 0
          AND SFOI.created_at >= '2015-01-01' AND SFOI.created_at < '2015-12-31'
          ) AS data_table
          GROUP BY data_table.value
          ORDER BY data_table.value ASC;


          You may need to adjust the math:



          SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded


          We don't pretend this query is 100% accurate.






          share|improve this answer

























          • You rock! I almost dare not asked. How would one add a DATE FROM and TO as a filter? (period of time)

            – snh_nl
            Sep 19 '16 at 11:54











          • We've updated the query. Please check.

            – Neklo.com
            Sep 19 '16 at 12:04










          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
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f137010%2fmagento-get-list-of-sales-revenue-per-brand-manufacturer%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          We've spent some time and that is the query we got:



          SELECT 
          data_table.value AS Brand, SUM(data_table.amount) AS Sales
          FROM
          (SELECT
          EAOV.value,
          (SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded) AS amount
          FROM
          eav_attribute_option AS EAO
          INNER JOIN eav_attribute_option_value AS EAOV ON EAO.option_id = EAOV.option_id
          AND EAO.attribute_id = (SELECT
          attribute_id
          FROM
          eav_attribute
          WHERE
          attribute_code = 'manufacturer')
          INNER JOIN catalog_product_entity_int AS CPEI ON CPEI.value = EAOV.option_id
          INNER JOIN sales_flat_order_item AS SFOI ON CPEI.entity_id = SFOI.product_id
          AND SFOI.price > 0
          AND SFOI.created_at >= '2015-01-01' AND SFOI.created_at < '2015-12-31'
          ) AS data_table
          GROUP BY data_table.value
          ORDER BY data_table.value ASC;


          You may need to adjust the math:



          SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded


          We don't pretend this query is 100% accurate.






          share|improve this answer

























          • You rock! I almost dare not asked. How would one add a DATE FROM and TO as a filter? (period of time)

            – snh_nl
            Sep 19 '16 at 11:54











          • We've updated the query. Please check.

            – Neklo.com
            Sep 19 '16 at 12:04















          3














          We've spent some time and that is the query we got:



          SELECT 
          data_table.value AS Brand, SUM(data_table.amount) AS Sales
          FROM
          (SELECT
          EAOV.value,
          (SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded) AS amount
          FROM
          eav_attribute_option AS EAO
          INNER JOIN eav_attribute_option_value AS EAOV ON EAO.option_id = EAOV.option_id
          AND EAO.attribute_id = (SELECT
          attribute_id
          FROM
          eav_attribute
          WHERE
          attribute_code = 'manufacturer')
          INNER JOIN catalog_product_entity_int AS CPEI ON CPEI.value = EAOV.option_id
          INNER JOIN sales_flat_order_item AS SFOI ON CPEI.entity_id = SFOI.product_id
          AND SFOI.price > 0
          AND SFOI.created_at >= '2015-01-01' AND SFOI.created_at < '2015-12-31'
          ) AS data_table
          GROUP BY data_table.value
          ORDER BY data_table.value ASC;


          You may need to adjust the math:



          SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded


          We don't pretend this query is 100% accurate.






          share|improve this answer

























          • You rock! I almost dare not asked. How would one add a DATE FROM and TO as a filter? (period of time)

            – snh_nl
            Sep 19 '16 at 11:54











          • We've updated the query. Please check.

            – Neklo.com
            Sep 19 '16 at 12:04













          3












          3








          3







          We've spent some time and that is the query we got:



          SELECT 
          data_table.value AS Brand, SUM(data_table.amount) AS Sales
          FROM
          (SELECT
          EAOV.value,
          (SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded) AS amount
          FROM
          eav_attribute_option AS EAO
          INNER JOIN eav_attribute_option_value AS EAOV ON EAO.option_id = EAOV.option_id
          AND EAO.attribute_id = (SELECT
          attribute_id
          FROM
          eav_attribute
          WHERE
          attribute_code = 'manufacturer')
          INNER JOIN catalog_product_entity_int AS CPEI ON CPEI.value = EAOV.option_id
          INNER JOIN sales_flat_order_item AS SFOI ON CPEI.entity_id = SFOI.product_id
          AND SFOI.price > 0
          AND SFOI.created_at >= '2015-01-01' AND SFOI.created_at < '2015-12-31'
          ) AS data_table
          GROUP BY data_table.value
          ORDER BY data_table.value ASC;


          You may need to adjust the math:



          SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded


          We don't pretend this query is 100% accurate.






          share|improve this answer















          We've spent some time and that is the query we got:



          SELECT 
          data_table.value AS Brand, SUM(data_table.amount) AS Sales
          FROM
          (SELECT
          EAOV.value,
          (SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded) AS amount
          FROM
          eav_attribute_option AS EAO
          INNER JOIN eav_attribute_option_value AS EAOV ON EAO.option_id = EAOV.option_id
          AND EAO.attribute_id = (SELECT
          attribute_id
          FROM
          eav_attribute
          WHERE
          attribute_code = 'manufacturer')
          INNER JOIN catalog_product_entity_int AS CPEI ON CPEI.value = EAOV.option_id
          INNER JOIN sales_flat_order_item AS SFOI ON CPEI.entity_id = SFOI.product_id
          AND SFOI.price > 0
          AND SFOI.created_at >= '2015-01-01' AND SFOI.created_at < '2015-12-31'
          ) AS data_table
          GROUP BY data_table.value
          ORDER BY data_table.value ASC;


          You may need to adjust the math:



          SFOI.row_total + SFOI.tax_amount + SFOI.hidden_tax_amount - SFOI.discount_amount - SFOI.amount_refunded


          We don't pretend this query is 100% accurate.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 19 '16 at 12:03

























          answered Sep 19 '16 at 11:52









          Neklo.comNeklo.com

          2,2791518




          2,2791518












          • You rock! I almost dare not asked. How would one add a DATE FROM and TO as a filter? (period of time)

            – snh_nl
            Sep 19 '16 at 11:54











          • We've updated the query. Please check.

            – Neklo.com
            Sep 19 '16 at 12:04

















          • You rock! I almost dare not asked. How would one add a DATE FROM and TO as a filter? (period of time)

            – snh_nl
            Sep 19 '16 at 11:54











          • We've updated the query. Please check.

            – Neklo.com
            Sep 19 '16 at 12:04
















          You rock! I almost dare not asked. How would one add a DATE FROM and TO as a filter? (period of time)

          – snh_nl
          Sep 19 '16 at 11:54





          You rock! I almost dare not asked. How would one add a DATE FROM and TO as a filter? (period of time)

          – snh_nl
          Sep 19 '16 at 11:54













          We've updated the query. Please check.

          – Neklo.com
          Sep 19 '16 at 12:04





          We've updated the query. Please check.

          – Neklo.com
          Sep 19 '16 at 12:04

















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f137010%2fmagento-get-list-of-sales-revenue-per-brand-manufacturer%23new-answer', 'question_page');

          );

          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







          Popular posts from this blog

          Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

          How to solve knockout JS error in Magento 2 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?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2

          Nissan Patrol Зміст Перше покоління — 4W60 (1951-1960) | Друге покоління — 60 series (1960-1980) | Третє покоління (1980–2002) | Четверте покоління — Y60 (1987–1998) | П'яте покоління — Y61 (1997–2013) | Шосте покоління — Y62 (2010- ) | Посилання | Зноски | Навігаційне менюОфіційний український сайтТест-драйв Nissan Patrol 2010 7-го поколінняNissan PatrolКак мы тестировали Nissan Patrol 2016рвиправивши або дописавши її