This file contains hidden or 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
| SELECT cv.value as `profile_complete`, e.* FROM customer_entity AS e | |
| LEFT JOIN customer_entity_varchar AS cv | |
| ON ( cv.attribute_id = ( | |
| SELECT attribute_id FROM eav_attribute | |
| WHERE entity_type_id = e.entity_type_id | |
| AND attribute_code = 'profile_complete' | |
| ) | |
| AND cv.entity_id = e.entity_id) | |
| WHERE cv.value IS NULL OR cv.value = 0 |
This file contains hidden or 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
| <?php | |
| /* | |
| Author: Tegan Snyder <tsnyder@tegdesign.com> | |
| Example of running a Dataflow profile via command line | |
| you can change the profile_id to the one you want to | |
| run and issue: | |
| time php manual-dataflow-profile.php | |
| note you may need to increase the memory_limit in php cli's php_cli.ini | |
| RHEL linux copy /etc/php.ini to /etc/php_cli.ini and make changes there then restart Apache. |
This file contains hidden or 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
| SELECT b.request_path FROM enterprise_catalog_product_rewrite a | |
| INNER JOIN enterprise_url_rewrite b ON b.url_rewrite_id = a.url_rewrite_id | |
| WHERE a.product_id = 19745 |
This file contains hidden or 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
| SELECT b.value AS thumbnail, | |
| b.entity_id, | |
| e.request_path, | |
| f.value AS product_name | |
| FROM `catalog_product_entity` AS a | |
| LEFT JOIN `catalog_product_entity_media_gallery` AS b ON a.entity_id = b.entity_id | |
| INNER JOIN `catalog_product_entity_media_gallery_value` AS c ON c.value_id = b.value_id | |
| INNER JOIN enterprise_catalog_product_rewrite d ON d.product_id = a.entity_id | |
| INNER JOIN enterprise_url_rewrite e ON e.url_rewrite_id = d.url_rewrite_id | |
| INNER JOIN catalog_product_entity_varchar f ON f.entity_id = a.entity_id |
This file contains hidden or 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
| # install dependencies | |
| sudo yum install curl-devel | |
| sudo yum install libxml2-devel | |
| # install extension for solr -- note use pear instead of pecl install | |
| sudo pear install pecl/solr | |
| # when it asks for libcURL path if you are on a 64bit machine | |
| # change: | |
| libcURL install prefix [/usr] : /usr/lib64 |
This file contains hidden or 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
| SELECT sub_query.month_ordered, | |
| sub_query.year_ordered, | |
| AVG(sub_query.base_subtotal) AS average_base_subtotal, | |
| AVG(sub_query.discount_amount) AS average_discount_amt, | |
| AVG(sub_query.order_qty) AS average_total_item_count, | |
| COUNT(sub_query.entity_id) AS total_orders | |
| FROM | |
| (SELECT so.entity_id, | |
| MONTH(so.created_at) AS month_ordered, | |
| YEAR(so.created_at) AS year_ordered, |
This file contains hidden or 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
| SELECT sub_query.month_ordered, | |
| sub_query.year_ordered, | |
| AVG(sub_query.base_subtotal) AS average_base_subtotal, | |
| AVG(sub_query.discount_amount) AS average_discount_amt, | |
| AVG(sub_query.order_qty) AS average_total_item_count, | |
| COUNT(sub_query.entity_id) AS total_orders | |
| FROM | |
| (SELECT so.entity_id, | |
| MONTH(so.created_at) AS month_ordered, | |
| YEAR(so.created_at) AS year_ordered, |
This file contains hidden or 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
| SELECT AVG(order_cnt) AS ppy | |
| FROM | |
| (SELECT customer_id, | |
| COUNT(customer_id) AS order_cnt | |
| FROM | |
| (SELECT so.customer_id, | |
| YEAR(so.created_at) AS year_ordered, | |
| group_concat(si.sku SEPARATOR ',') AS skus | |
| FROM `sales_flat_order` AS so | |
| INNER JOIN `sales_flat_order_item` AS si ON si.order_id=so.entity_id |
This file contains hidden or 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
| SELECT AVG(average_base_subtotal) AS acp | |
| FROM | |
| (SELECT AVG(sub_query.base_subtotal) AS average_base_subtotal | |
| FROM | |
| (SELECT so.base_subtotal | |
| FROM `sales_flat_order` AS so | |
| INNER JOIN `sales_flat_order_item` AS si ON si.order_id=so.entity_id | |
| GROUP BY entity_id) AS sub_query) AS sub_query |
This file contains hidden or 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
| SELECT sub_query.month_ordered, | |
| sub_query.year_ordered, | |
| SUM(sub_query.base_subtotal) AS sum_base_subtotal, | |
| SUM(sub_query.discount_amount) AS sum_discount_amt, | |
| SUM(sub_query.order_qty) AS sum_total_item_count, | |
| COUNT(sub_query.entity_id) AS total_orders | |
| FROM | |
| (SELECT so.entity_id, | |
| MONTH(so.created_at) AS month_ordered, | |
| YEAR(so.created_at) AS year_ordered, |