SELECT * FROM setting WHERE store_id = '0' ORDER BY store_id ASC;
SELECT * FROM customer_group;
SELECT language_id FROM language;
SELECT * FROM category WHERE parent_id = '0';
SELECT * FROM category_path WHERE category_id = '0' ORDER BY level ASC;
--SELECT * FROM store WHERE REPLACE(ssl, 'www.', '') = '" . $db->escape('https://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/') . "';
--SELECT * FROM store WHERE REPLACE(url, 'www.', '') = '" . $db->escape('http://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/') . "';
SELECT * FROM setting WHERE store_id = '0' OR store_id = '0' ORDER BY store_id ASC;
SELECT * FROM language WHERE status = '1';
--SELECT COUNT(*) AS total FROM myorder WHERE order_status_id > '0' AND (DATE(date_added) = DATE(NOW()) AND HOUR(date_added) = '0') GROUP BY HOUR(date_added) ORDER BY date_added ASC;
--SELECT COUNT(*) AS total FROM customer WHERE DATE(date_added) = DATE(NOW()) AND HOUR(date_added) = '0' GROUP BY HOUR(date_added) ORDER BY date_added ASC;
--SELECT COUNT(*) AS total FROM myorder WHERE order_status_id > '0' AND DATE(date_added) = '0' GROUP BY DATE(date_added);
--SELECT COUNT(*) AS total FROM customer WHERE DATE(date_added) = '0' GROUP BY DATE(date_added);
--SELECT COUNT(*) AS total FROM myorder WHERE order_status_id > '0' AND (DATE(date_added) = '0') GROUP BY DAY(date_added);
--SELECT COUNT(*) AS total FROM customer WHERE DATE(date_added) = '0' GROUP BY DAY(date_added);
--SELECT COUNT(*) AS total FROM myorder WHERE order_status_id > '0' AND YEAR(date_added) = '" . date('Y') . "' AND MONTH(date_added) = '0' GROUP BY MONTH(date_added);
--SELECT COUNT(*) AS total FROM customer WHERE YEAR(date_added) = '" . date('Y') . "' AND MONTH(date_added) = '0' GROUP BY MONTH(date_added);
SELECT  *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT wcd.unit FROM weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '0') AS weight_class, (SELECT lcd.unit FROM length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '0') AS length_class, p.sort_order FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '0' AND pd.language_id = '0';
SELECT  *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT wcd.unit FROM weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '0') AS weight_class, (SELECT lcd.unit FROM length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '0') AS length_class, p.sort_order FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '0' AND pd.language_id = '0';
SELECT  *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT wcd.unit FROM weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '0') AS weight_class, (SELECT lcd.unit FROM length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '0') AS length_class, p.sort_order FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '0' AND pd.language_id = '0';
SELECT  *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT wcd.unit FROM weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '0') AS weight_class, (SELECT lcd.unit FROM length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '0') AS length_class, p.sort_order FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '0' AND pd.language_id = '0';
SELECT * FROM setting WHERE store_id = '0';
SELECT * FROM language;
SELECT  * FROM store WHERE store_id = '0';
SELECT * FROM store ORDER BY url;
SELECT COUNT(*) AS total FROM store;
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_layout_id' AND value = '0' AND store_id != '0';
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_language' AND value = '0' AND store_id != '0';
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_currency' AND value = '0' AND store_id != '0';
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_country_id' AND value = '0' AND store_id != '0';
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_zone_id' AND value = '0' AND store_id != '0';
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_customer_group_id' AND value = '0' AND store_id != '0';
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_account_id' AND value = '0' AND store_id != '0';
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_checkout_id' AND value = '0' AND store_id != '0';
SELECT COUNT(*) AS total FROM setting WHERE key = 'config_order_status_id' AND value = '0' AND store_id != '0';
SELECT * FROM extension WHERE type = '0';
SELECT * FROM setting WHERE store_id = '0' AND mygroup = '0';
/*SELECT * FROM amazonus_product;
SELECT * FROM amazonus_product;
SELECT category FROM amazonus_product;
SELECT messages FROM amazonus_product;
SELECT sku, insertion_id FROM amazonus_product;
SELECT * FROM amazonus_product_error;
SELECT product_id, sku FROM amazonus_product;
SELECT COUNT(*) as 'countAMAZONUS_PRODUCT_LINK' FROM amazonus_product_link WHERE product_id = '0' AND amazonus_sku = '0' ;
SELECT insertion_id FROM amazonus_product;
SELECT * FROM amazonus_product_link WHERE product_id = 0 AND var = '0';*/
SELECT * FROM  store;
SELECT * FROM attribute_group WHERE attribute_group_id = '0';
SELECT * FROM attribute_group ag ,attribute_group_description agd WHERE (ag.attribute_group_id = agd.attribute_group_id) AND agd.language_id = '0';
SELECT * FROM attribute_group_description WHERE attribute_group_id = '0';
SELECT COUNT(*) AS total FROM attribute_group;
SELECT  * FROM product p , product_description pd WHERE (p.product_id = pd.product_id) AND p.product_id = '0' AND pd.language_id = '0';
SELECT  *, (SELECT keyword FROM url_alias WHERE query = 'product_id=0') AS keyword FROM product p , product_description pd WHERE (p.product_id = pd.product_id) AND p.product_id = '0' AND pd.language_id = '0';
SELECT * FROM product p , product_description pd WHERE (p.product_id = pd.product_id);
SELECT * FROM product p , product_description pd , product_to_category p2c  WHERE (p.product_id = pd.product_id) AND (p.product_id = p2c.product_id) AND pd.language_id = '0' AND p2c.category_id = '0' ORDER BY pd.name ASC;
SELECT * FROM product_description WHERE product_id = '0';
SELECT * FROM product_to_category WHERE product_id = '0';
SELECT * FROM product_filter WHERE product_id = '0';
SELECT attribute_id FROM product_attribute WHERE product_id = '0' GROUP BY attribute_id;
SELECT * FROM product_attribute WHERE product_id = '0' AND attribute_id = '0';
SELECT * FROM product_option po , option o , option_description od WHERE (po.option_id = o.option_id)  AND (o.option_id = od.option_id) AND po.product_id = '0' AND od.language_id = '0';
SELECT * FROM product_option_value WHERE product_option_id = '0';
SELECT * FROM product_image WHERE product_id = '0';
SELECT * FROM product_discount WHERE product_id = '0' ORDER BY quantity, priority, price;
SELECT * FROM product_special WHERE product_id = '0' ORDER BY priority, price;
SELECT * FROM product_reward WHERE product_id = '0';
SELECT * FROM product_to_download WHERE product_id = '0';
SELECT * FROM product_to_store WHERE product_id = '0';
SELECT * FROM product_to_layout WHERE product_id = '0';
SELECT * FROM product_related WHERE product_id = '0';
--SELECT * FROM product_profile WHERE product_id = '0';
SELECT COUNT( p.product_id) AS total FROM product p ,product_description pd WHERE (p.product_id = pd.product_id);
SELECT COUNT(*) AS total FROM product WHERE tax_class_id = '0';
SELECT COUNT(*) AS total FROM product WHERE stock_status_id = '0';
SELECT COUNT(*) AS total FROM product WHERE weight_class_id = '0';
SELECT COUNT(*) AS total FROM product WHERE length_class_id = '0';
SELECT COUNT(*) AS total FROM product_to_download WHERE download_id = '0';
SELECT COUNT(*) AS total FROM product WHERE manufacturer_id = '0';
SELECT COUNT(*) AS total FROM product_attribute WHERE attribute_id = '0';
SELECT COUNT(*) AS total FROM product_option WHERE option_id = '0';
SELECT COUNT(*) AS total FROM product_to_layout WHERE layout_id = '0';
SELECT * FROM filter_group fg , filter_group_description fgd WHERE (fg.filter_group_id = fgd.filter_group_id) AND fg.filter_group_id = '0' AND fgd.language_id = '0';
SELECT * FROM filter_group fg , filter_group_description fgd WHERE (fg.filter_group_id = fgd.filter_group_id) AND fgd.language_id = '0';
SELECT * FROM filter_group_description WHERE filter_group_id = '0';
SELECT *, (SELECT name FROM filter_group_description fgd WHERE f.filter_group_id = fgd.filter_group_id AND fgd.language_id = '0') AS mygroup FROM filter f , filter_description fd WHERE (f.filter_id = fd.filter_id) AND f.filter_id = '0' AND fd.language_id = '0';
SELECT *, (SELECT name FROM filter_group_description fgd WHERE f.filter_group_id = fgd.filter_group_id AND fgd.language_id = '0') AS mygroup FROM filter f , filter_description fd WHERE (f.filter_id = fd.filter_id) AND fd.language_id = '0';
SELECT * FROM filter WHERE filter_group_id = '0';
SELECT * FROM filter_description WHERE filter_id = '0';
SELECT COUNT(*) AS total FROM filter_group;
SELECT  * FROM download d , download_description dd WHERE (d.download_id = dd.download_id) AND d.download_id = '0' AND dd.language_id = '0';
SELECT * FROM download d , download_description dd WHERE (d.download_id = dd.download_id) AND dd.language_id = '0';
SELECT * FROM download_description WHERE download_id = '0';
SELECT COUNT(*) AS total FROM download;
SELECT  *, (SELECT keyword FROM url_alias WHERE query = 'manufacturer_id=0') AS keyword FROM manufacturer WHERE manufacturer_id = '0';
SELECT * FROM manufacturer;
SELECT * FROM manufacturer_to_store WHERE manufacturer_id = '0';
SELECT COUNT(*) AS total FROM manufacturer WHERE image = '0';
SELECT COUNT(*) AS total FROM manufacturer;
SELECT  *, (SELECT pd.name FROM product_description pd WHERE pd.product_id = r.product_id AND pd.language_id = '0') AS product FROM review r WHERE r.review_id = '0';
SELECT r.review_id, pd.name, r.author, r.rating, r.status, r.date_added FROM review r , product_description pd WHERE (r.product_id = pd.product_id) AND pd.language_id = '0';
SELECT COUNT(*) AS total FROM review;
SELECT COUNT(*) AS total FROM review WHERE status = '0';
SELECT * FROM attribute a , attribute_description ad WHERE (a.attribute_id = ad.attribute_id) AND a.attribute_id = '0' AND ad.language_id = '0';
SELECT *, (SELECT agd.name FROM attribute_group_description agd WHERE agd.attribute_group_id = a.attribute_group_id AND agd.language_id = '0') AS attribute_group FROM attribute a , attribute_description ad WHERE (a.attribute_id = ad.attribute_id) AND ad.language_id = '0';
SELECT * FROM attribute_description WHERE attribute_id = '0';
SELECT *, (SELECT agd.name FROM attribute_group_description agd WHERE agd.attribute_group_id = a.attribute_group_id AND agd.language_id = '0') AS attribute_group FROM attribute a , attribute_description ad WHERE (a.attribute_id = ad.attribute_id) AND ad.language_id = '0';
SELECT COUNT(*) AS total FROM attribute;
SELECT COUNT(*) AS total FROM attribute WHERE attribute_group_id = '0';
SELECT * FROM profile WHERE profile_id = '0';
SELECT * FROM profile_description WHERE profile_id = '0';
SELECT p.profile_id, p.sort_order, pd.name FROM profile AS p , profile_description AS pd WHERE pd.profile_id = p.profile_id AND pd.language_id = '0' ORDER BY p.sort_order ASC;

SELECT  *, (SELECT keyword FROM url_alias WHERE query = 'information_id=0') AS keyword FROM information WHERE information_id = '0';

SELECT * FROM information i , information_description id WHERE (i.information_id = id.information_id) AND id.language_id = '0';
SELECT * FROM information i , information_description id WHERE (i.information_id = id.information_id) AND id.language_id = '0' ORDER BY id.title;
SELECT * FROM information_description WHERE information_id = '0';
SELECT * FROM information_to_store WHERE information_id = '0';
SELECT * FROM information_to_layout WHERE information_id = '0';
SELECT COUNT(*) AS total FROM information;
SELECT COUNT(*) AS total FROM information_to_layout WHERE layout_id = '0';
SELECT * FROM category_path WHERE category_id = '0' ORDER BY level ASC;
SELECT * FROM category_path WHERE path_id = '0' ORDER BY level ASC;
SELECT * FROM category_path WHERE category_id = '0' ORDER BY level ASC;
SELECT * FROM category_path WHERE category_id = '0' ORDER BY level ASC;
SELECT * FROM category_path WHERE category_id = '0' ORDER BY level ASC;
SELECT * FROM category_path WHERE path_id = '0';
SELECT * FROM category WHERE parent_id = '0';
SELECT * FROM category_path WHERE category_id = '0' ORDER BY level ASC;
--SELECT  *, (SELECT GROUP_CONCAT(cd1.name ORDER BY level SEPARATOR ' &gt; ') FROM category_path cp , category_description cd1 WHERE (cp.path_id = cd1.category_id AND cp.category_id != cp.path_id) AND cp.category_id = c.category_id AND cd1.language_id = '0' GROUP BY cp.category_id) AS path, (SELECT keyword FROM url_alias WHERE query = 'category_id=0') AS keyword FROM category c , category_description cd2 WHERE (c.category_id = cd2.category_id) AND c.category_id = '0' AND cd2.language_id = '0';
--SELECT cp.category_id AS category_id, GROUP_CONCAT(cd1.name ORDER BY cp.level SEPARATOR ' &gt; ') AS name, c.parent_id, c.sort_order FROM category_path cp , category c , category_description cd1 , category_description cd2 WHERE (cp.path_id = c.category_id)  AND (c.category_id = cd1.category_id)  AND (cp.category_id = cd2.category_id) AND cd1.language_id = '0' AND cd2.language_id = '0';
SELECT * FROM category_description WHERE category_id = '0';
SELECT * FROM category_filter WHERE category_id = '0';
SELECT * FROM category_to_store WHERE category_id = '0';
SELECT * FROM category_to_layout WHERE category_id = '0';
SELECT COUNT(*) AS total FROM category;
SELECT COUNT(*) AS total FROM category WHERE image = '0';
SELECT COUNT(*) AS total FROM category_to_layout WHERE layout_id = '0';
SELECT * FROM option o , option_description od WHERE (o.option_id = od.option_id) AND o.option_id = '0' AND od.language_id = '0';
SELECT * FROM option o , option_description od WHERE (o.option_id = od.option_id) AND od.language_id = '0';
SELECT * FROM option_description WHERE option_id = '0';
SELECT * FROM option_value ov , option_value_description ovd WHERE (ov.option_value_id = ovd.option_value_id) AND ov.option_value_id = '0' AND ovd.language_id = '0';
SELECT * FROM option_value ov , option_value_description ovd WHERE (ov.option_value_id = ovd.option_value_id) AND ov.option_id = '0' AND ovd.language_id = '0' ORDER BY ov.sort_order ASC;
SELECT * FROM option_value WHERE option_id = '0';
SELECT * FROM option_value_description WHERE option_value_id = '0';
SELECT COUNT(*) AS total FROM option;
--SELECT * FROM ebay_image_import;
SELECT * FROM product_option po , option o , option_description od WHERE (po.option_id = o.option_id)  AND (o.option_id = od.option_id) AND po.product_id = '0' AND od.language_id = '0' ORDER BY o.sort_order;
SELECT * FROM product_option_value pov , option_value ov , option_value_description ovd  WHERE (pov.option_value_id = ov.option_value_id) AND (ov.option_value_id = ovd.option_value_id) AND pov.product_option_id = '0' AND ovd.language_id = '0' ORDER BY ov.sort_order;
--SELECT * FROM ebay_listing WHERE product_id = '0' AND status = 1 ORDER BY ebay_listing_id DESC;
-- SELECT * FROM ;
--SELECT * FROM ebay_profile;
-- SELECT ebay_profile_id FROM ;
/*SELECT * FROM ebay_store_category WHERE parent_id = '0';
SELECT * FROM ebay_store_category WHERE parent_id = '0';
SELECT * FROM ebay_store_category WHERE parent_id = '0';
SELECT * FROM ebay_category WHERE CategoryID = CategoryParentID;
SELECT * FROM ebay_category WHERE CategoryParentID = '0';
SELECT * FROM ebay_shipping WHERE InternationalService = '0' AND site = '3' AND ValidForSellingFlow = '1';
SELECT * FROM ebay_shipping_location WHERE shipping_location != 'None' AND shipping_location != 'Worldwide';
SELECT description FROM ebay_shipping WHERE ShippingService = '0';
SELECT * FROM ebay_payment_method;
SELECT * FROM ebay_category_history ORDER BY used DESC ;
SELECT * FROM ebay_category WHERE CategoryID = '0' ;
SELECT used FROM ebay_category_history WHERE CategoryID = '0' ;
SELECT * FROM product WHERE product_id = '0' ;
SELECT product_id, ebay_item_id FROM ebay_listing WHERE status = 1;*/
SELECT ag.attribute_group_id, agd.name FROM product_attribute pa , attribute a , attribute_group ag , attribute_group_description agd WHERE (pa.attribute_id = a.attribute_id) AND (a.attribute_group_id = ag.attribute_group_id) AND (ag.attribute_group_id = agd.attribute_group_id) AND  pa.product_id = '0' AND agd.language_id = '0' GROUP BY ag.attribute_group_id ORDER BY ag.sort_order, agd.name;
SELECT a.attribute_id, ad.name, pa.text FROM product_attribute pa , attribute a , attribute_description ad WHERE (pa.attribute_id = a.attribute_id) AND (a.attribute_id = ad.attribute_id) AND  pa.product_id = '0' AND a.attribute_group_id = '0' AND ad.language_id = '0' AND pa.language_id = '0' ORDER BY a.sort_order, ad.name;
--SELECT * FROM ebay_template WHERE template_id = '0' ;
--SELECT * FROM ebay_template;
SELECT co.ip, co.customer_id, co.url, co.referer, co.date_added FROM customer_online co , customer c WHERE (co.customer_id = c.customer_id);
SELECT COUNT(*) AS total FROM customer_online co , customer c WHERE (co.customer_id = c.customer_id);
--SELECT at.affiliate_id, CONCAT(a.firstname, ' ', a.lastname) AS affiliate, a.email, a.status, SUM(at.amount) AS commission, COUNT(o.order_id) AS orders, SUM(o.total) AS total FROM affiliate_transaction at , affiliate a  , myorder o WHERE (at.affiliate_id = a.affiliate_id) AND (at.order_id = o.order_id);
SELECT COUNT( affiliate_id) AS total FROM affiliate_transaction;
--SELECT at.product_id, CONCAT(a.firstname, ' ', a.lastname) AS affiliate, a.email, a.status, SUM(at.amount) AS commission, COUNT(o.order_id) AS orders, SUM(o.total) AS total FROM affiliate_transaction at , affiliate a , myorder o WHERE (at.affiliate_id = a.affiliate_id) AND (at.order_id = o.order_id) , product;
--SELECT COUNT( product_id) AS total FROM affiliate_transaction;
SELECT ch.coupon_id, c.name, c.code, COUNT( ch.order_id) AS orders, SUM(ch.amount) AS total FROM coupon_history ch , coupon c WHERE (ch.coupon_id = c.coupon_id);
SELECT COUNT( coupon_id) AS total FROM coupon_history;
SELECT pd.name, p.model, p.viewed FROM product p , product_description pd WHERE (p.product_id = pd.product_id) AND pd.language_id = '0' AND p.viewed > 0 ORDER BY p.viewed DESC;
SELECT COUNT(*) AS total FROM product WHERE viewed > 0;
SELECT SUM(viewed) AS total FROM product;
SELECT op.name, op.model, SUM(op.quantity) AS quantity, SUM(op.total + op.total * op.tax / 100) AS total FROM order_product op , myorder o WHERE (op.order_id = o.order_id);
SELECT COUNT( op.model) AS total FROM order_product op , myorder o WHERE (op.order_id = o.order_id);
--  AYTO THA EPREPE NA PAIZEI SELECT MIN(tmp.date_added) AS date_start, MAX(tmp.date_added) AS date_end, COUNT(tmp.order_id) AS orders, SUM(tmp.products) AS products, SUM(tmp.tax) AS tax, SUM(tmp.total) AS total FROM (SELECT o.order_id, (SELECT SUM(op.quantity) FROM order_product op WHERE op.order_id = o.order_id GROUP BY op.order_id) AS products, (SELECT SUM(ot.value) FROM order_total ot WHERE ot.order_id = o.order_id AND ot.code = 'tax' GROUP BY ot.order_id) AS tax, o.total, o.date_added FROM myorder o;




--SELECT COUNT( DAY(date_added)) AS total FROM order;
--SELECT COUNT( WEEK(date_added)) AS total FROM order;
--SELECT COUNT( MONTH(date_added)) AS total FROM order;
--SELECT COUNT( YEAR(date_added)) AS total FROM order;






SELECT MIN(o.date_added) AS date_start, MAX(o.date_added) AS date_end, ot.title, SUM(ot.value) AS total, COUNT(o.order_id) AS orders FROM order_total ot , myorder o WHERE (ot.order_id = o.order_id) AND ot.code = 'tax' ;
--SELECT COUNT(*) AS total FROM (SELECT COUNT(*) AS total FROM order_total as ot , myorder o WHERE (ot.order_id = o.order_id) AND ot.code = 'tax');
SELECT MIN(o.date_added) AS date_start, MAX(o.date_added) AS date_end, ot.title, SUM(ot.value) AS total, COUNT(o.order_id) AS orders FROM order_total ot , myorder o WHERE (ot.order_id = o.order_id) AND ot.code = 'shipping';
--SELECT COUNT(*) AS total FROM (SELECT COUNT(*) AS total FROM order_total ot , myorder o WHERE (ot.order_id = o.order_id) AND ot.code = 'shipping');
SELECT MIN(r.date_added) AS date_start, MAX(r.date_added) AS date_end, COUNT(r.return_id) AS returns FROM return r;



--SELECT COUNT( DAY(date_added)) AS total FROM return;
--SELECT COUNT( WEEK(date_added)) AS total FROM return;
--SELECT COUNT( MONTH(date_added)) AS total FROM return;
--SELECT COUNT( YEAR(date_added)) AS total FROM return;





--SELECT tmp.customer_id, tmp.customer, tmp.email, tmp.customer_group, tmp.status, COUNT(tmp.order_id) AS orders, SUM(tmp.products) AS products, SUM(tmp.total) AS total FROM (SELECT o.order_id, c.customer_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, o.email, cgd.name AS customer_group, c.status, (SELECT SUM(op.quantity) FROM order_product op WHERE op.order_id = o.order_id GROUP BY op.order_id) AS products, o.total FROM myorder o , customer c , customer_group_description cgd WHERE (o.customer_id = c.customer_id)  AND (c.customer_group_id = cgd.customer_group_id) AND o.customer_id > 0 AND cgd.language_id = '0';
SELECT COUNT( o.customer_id) AS total FROM myorder o WHERE o.customer_id > '0';
--SELECT cr.customer_id, CONCAT(c.firstname, ' ', c.lastname) AS customer, c.email, cgd.name AS customer_group, c.status, SUM(cr.points) AS points, COUNT(o.order_id) AS orders, SUM(o.total) AS total FROM customer_reward cr , customer c, customer_group_description cgd, myorder o WHERE (cr.customer_id = c.customer_id) AND (c.customer_group_id = cgd.customer_group_id) AND (cr.order_id = o.order_id) AND cgd.language_id = '0';
SELECT COUNT( customer_id) AS total FROM customer_reward;
--SELECT ct.customer_id, CONCAT(c.firstname, ' ', c.lastname) AS customer, c.email, cgd.name AS customer_group, c.status, SUM(ct.amount) AS total FROM customer_transaction ct , customer c, customer_group_description cgd  WHERE (ct.customer_id = c.customer_id)AND (c.customer_group_id = cgd.customer_group_id) AND cgd.language_id = '0';
SELECT COUNT( customer_id) AS total FROM customer_transaction;
SELECT * FROM attribute_description WHERE language_id = '0';
SELECT * FROM attribute_group_description WHERE language_id = '0';
SELECT * FROM banner_image_description WHERE language_id = '0';
SELECT * FROM category_description WHERE language_id = '0';
SELECT * FROM customer_group_description WHERE language_id = '0';
SELECT * FROM download_description WHERE language_id = '0';
SELECT * FROM filter_description WHERE language_id = '0';
SELECT * FROM filter_group_description WHERE language_id = '0';
SELECT * FROM information_description WHERE language_id = '0';
SELECT * FROM length_class_description WHERE language_id = '0';
SELECT * FROM option_description WHERE language_id = '0';
SELECT * FROM option_value_description WHERE language_id = '0';
SELECT * FROM order_status WHERE language_id = '0';
SELECT * FROM product_description WHERE language_id = '0';
SELECT * FROM product_attribute WHERE language_id = '0';
SELECT * FROM return_action WHERE language_id = '0';
SELECT * FROM return_reason WHERE language_id = '0';
SELECT * FROM return_status WHERE language_id = '0';
SELECT * FROM stock_status WHERE language_id = '0';
SELECT * FROM voucher_theme_description WHERE language_id = '0';
SELECT * FROM weight_class_description WHERE language_id = '0';
SELECT  * FROM language WHERE language_id = '0';
SELECT * FROM language;
SELECT * FROM language ORDER BY sort_order, name;
SELECT COUNT(*) AS total FROM language;
SELECT  * FROM zone WHERE zone_id = '0';
SELECT *, z.name, c.name AS country FROM zone z , country c WHERE (z.country_id = c.country_id);
SELECT * FROM zone WHERE country_id = '0' AND status = '1' ORDER BY name;
SELECT COUNT(*) AS total FROM zone;
SELECT COUNT(*) AS total FROM zone WHERE country_id = '0';
SELECT  * FROM currency WHERE currency_id = '0';
SELECT  * FROM currency WHERE code = '0';
SELECT * FROM currency;
SELECT * FROM currency ORDER BY title ASC;
SELECT * FROM currency WHERE code != '0';
SELECT * FROM currency WHERE code != '0';
SELECT COUNT(*) AS total FROM currency;
SELECT * FROM return_reason WHERE return_reason_id = '0' AND language_id = '0';
SELECT * FROM return_reason WHERE language_id = '0';
SELECT return_reason_id, name FROM return_reason WHERE language_id = '0' ORDER BY name;
SELECT * FROM return_reason WHERE return_reason_id = '0';
SELECT COUNT(*) AS total FROM return_reason WHERE language_id = '0';
SELECT  * FROM country WHERE country_id = '0';
SELECT * FROM country;
SELECT * FROM country ORDER BY name ASC;
SELECT COUNT(*) AS total FROM country;
SELECT tr.tax_rate_id, tr.name AS name, tr.rate, tr.type, tr.geo_zone_id, gz.name AS geo_zone, tr.date_added, tr.date_modified FROM tax_rate tr , geo_zone gz WHERE (tr.geo_zone_id = gz.geo_zone_id) AND tr.tax_rate_id = '0';
SELECT tr.tax_rate_id, tr.name AS name, tr.rate, tr.type, gz.name AS geo_zone, tr.date_added, tr.date_modified FROM tax_rate tr , geo_zone gz WHERE (tr.geo_zone_id = gz.geo_zone_id);
SELECT * FROM tax_rate_to_customer_group WHERE tax_rate_id = '0';
SELECT COUNT(*) AS total FROM tax_rate;
SELECT COUNT(*) AS total FROM tax_rate WHERE geo_zone_id = '0';
SELECT * FROM return_status WHERE return_status_id = '0' AND language_id = '0';
SELECT * FROM return_status WHERE language_id = '0';
SELECT return_status_id, name FROM return_status WHERE language_id = '0' ORDER BY name;
SELECT * FROM return_status WHERE return_status_id = '0';
SELECT COUNT(*) AS total FROM return_status WHERE language_id = '0';
SELECT * FROM tax_class WHERE tax_class_id = '0';
SELECT * FROM tax_class;
SELECT * FROM tax_class;
SELECT COUNT(*) AS total FROM tax_class;
SELECT * FROM tax_rule WHERE tax_class_id = '0';
SELECT COUNT( tax_class_id) AS total FROM tax_rule WHERE tax_rate_id = '0';
SELECT * FROM weight_class wc , weight_class_description wcd WHERE (wc.weight_class_id = wcd.weight_class_id) AND wcd.language_id = '0';
SELECT * FROM weight_class wc , weight_class_description wcd WHERE (wc.weight_class_id = wcd.weight_class_id) AND wcd.language_id = '0';
SELECT * FROM weight_class wc , weight_class_description wcd WHERE (wc.weight_class_id = wcd.weight_class_id) AND wc.weight_class_id = '0' AND wcd.language_id = '0';
SELECT * FROM weight_class_description WHERE unit = '0';
SELECT * FROM weight_class_description WHERE weight_class_id = '0';
SELECT COUNT(*) AS total FROM weight_class;
SELECT * FROM return_action WHERE return_action_id = '0' AND language_id = '0';
SELECT * FROM return_action WHERE language_id = '0';
SELECT return_action_id, name FROM return_action WHERE language_id = '0' ORDER BY name;
SELECT * FROM return_action WHERE return_action_id = '0';
SELECT COUNT(*) AS total FROM return_action WHERE language_id = '0';
SELECT * FROM order_status WHERE order_status_id = '0' AND language_id = '0';
SELECT * FROM order_status WHERE language_id = '0';
SELECT order_status_id, name FROM order_status WHERE language_id = '0' ORDER BY name;
SELECT * FROM order_status WHERE order_status_id = '0';
SELECT COUNT(*) AS total FROM order_status WHERE language_id = '0';
SELECT * FROM length_class lc , length_class_description lcd WHERE (lc.length_class_id = lcd.length_class_id) AND lcd.language_id = '0';
SELECT * FROM length_class lc , length_class_description lcd WHERE (lc.length_class_id = lcd.length_class_id) AND lcd.language_id = '0';
SELECT * FROM length_class lc , length_class_description lcd WHERE (lc.length_class_id = lcd.length_class_id) AND lc.length_class_id = '0' AND lcd.language_id = '0';
SELECT * FROM length_class_description WHERE unit = '0';
SELECT * FROM length_class_description WHERE length_class_id = '0';
SELECT COUNT(*) AS total FROM length_class;
SELECT  * FROM geo_zone WHERE geo_zone_id = '0';
SELECT * FROM geo_zone;
SELECT * FROM geo_zone ORDER BY name ASC;
SELECT COUNT(*) AS total FROM geo_zone;
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0';
SELECT COUNT(*) AS total FROM zone_to_geo_zone WHERE geo_zone_id = '0';
SELECT COUNT(*) AS total FROM zone_to_geo_zone WHERE country_id = '0';
SELECT COUNT(*) AS total FROM zone_to_geo_zone WHERE zone_id = '0';
SELECT * FROM stock_status WHERE stock_status_id = '0' AND language_id = '0';
SELECT * FROM stock_status WHERE language_id = '0';
SELECT stock_status_id, name FROM stock_status WHERE language_id = '0' ORDER BY name;
SELECT * FROM stock_status WHERE stock_status_id = '0';
SELECT COUNT(*) AS total FROM stock_status WHERE language_id = '0';
--SELECT * FROM play_product_insert pi , product p WHERE (p.product_id = pi.product_id) AND pi.status = 1;
/*SELECT status FROM play_product_insert WHERE product_id = '0';
SELECT * FROM play_product_insert WHERE product_id = '0';
SELECT * FROM play_product_insert_error WHERE product_id = '0';
*/
SELECT  user_group_id FROM user WHERE user_id = '0';
SELECT  * FROM user_group WHERE user_group_id = '0';
SELECT  * FROM user_group WHERE user_group_id = '0';
SELECT * FROM user_group;
SELECT COUNT(*) AS total FROM user_group;
SELECT * FROM user WHERE user_id = '0';
SELECT * FROM user WHERE username = '0';
SELECT * FROM user WHERE code = '0' AND code != '';
SELECT * FROM user;
SELECT COUNT(*) AS total FROM user;
SELECT COUNT(*) AS total FROM user WHERE user_group_id = '0';
SELECT COUNT(*) AS total FROM user WHERE LCASE(email) = '0';
SELECT * FROM customer_ban_ip WHERE customer_ban_ip_id = '0';
SELECT *, (SELECT COUNT( customer_id) FROM customer_ip ci WHERE ci.ip = cbi.ip) AS total FROM customer_ban_ip cbi;
SELECT COUNT(*) AS total FROM customer_ban_ip;
SELECT  * FROM affiliate WHERE affiliate_id = '0';
SELECT  * FROM affiliate WHERE LCASE(email) = '0';
--SELECT *, CONCAT(a.firstname, ' ', a.lastname) AS name, (SELECT SUM(at.amount) FROM affiliate_transaction at WHERE at.affiliate_id = a.affiliate_id GROUP BY at.affiliate_id) AS balance FROM affiliate a;
SELECT * FROM affiliate WHERE telephone = '1' ORDER BY firstname, lastname, email;
SELECT COUNT(*) AS total FROM affiliate;
SELECT COUNT(*) AS total FROM affiliate WHERE status = '0' OR approved = '0';
SELECT COUNT(*) AS total FROM affiliate WHERE country_id = '0';
SELECT COUNT(*) AS total FROM affiliate WHERE zone_id = '0';
SELECT * FROM affiliate_transaction WHERE affiliate_id = '0' ORDER BY date_added DESC ;
SELECT COUNT(*) AS total  FROM affiliate_transaction WHERE affiliate_id = '0';
SELECT SUM(amount) AS total FROM affiliate_transaction WHERE affiliate_id = '0';
SELECT COUNT(*) AS total FROM affiliate_transaction WHERE order_id = '0';
SELECT  * FROM coupon WHERE coupon_id = '0';
SELECT  * FROM coupon WHERE code = '0';
SELECT coupon_id, name, code, discount, date_start, date_end, status FROM coupon;
SELECT * FROM coupon_product WHERE coupon_id = '0';
SELECT * FROM coupon_category WHERE coupon_id = '0';
SELECT COUNT(*) AS total FROM coupon;
--SELECT ch.order_id, CONCAT(c.firstname, ' ', c.lastname) AS customer, ch.amount, ch.date_added FROM coupon_history ch , customer c WHERE (ch.customer_id = c.customer_id) AND ch.coupon_id = '0' ORDER BY ch.date_added ASC ;
SELECT COUNT(*) AS total FROM coupon_history WHERE coupon_id = '0';
SELECT * FROM order_recurring WHERE order_recurring_id = '0';
SELECT amount, type, created FROM order_recurring_transaction WHERE order_recurring_id = '0' ORDER BY created DESC;
SELECT  * FROM customer_group cg , customer_group_description cgd WHERE (cg.customer_group_id = cgd.customer_group_id) AND cg.customer_group_id = '0' AND cgd.language_id = '0';
SELECT * FROM customer_group cg , customer_group_description cgd WHERE (cg.customer_group_id = cgd.customer_group_id) AND cgd.language_id = '0';
SELECT * FROM customer_group_description WHERE customer_group_id = '0';
SELECT COUNT(*) AS total FROM customer_group;
SELECT * FROM order_fraud WHERE order_id = '0';
--SELECT  *, (SELECT CONCAT(c.firstname, ' ', c.lastname) FROM customer c WHERE c.customer_id = r.customer_id) AS customer FROM return r WHERE r.return_id = '0';
--SELECT *, CONCAT(r.firstname, ' ', r.lastname) AS customer, (SELECT rs.name FROM return_status rs WHERE rs.return_status_id = r.return_status_id AND rs.language_id = '0') AS status FROM return r;
SELECT COUNT(*) AS total FROM return;
SELECT COUNT(*) AS total FROM return WHERE return_status_id = '0';
SELECT COUNT(*) AS total FROM return WHERE return_reason_id = '0';
SELECT COUNT(*) AS total FROM return WHERE return_action_id = '0';
SELECT *, rs.name AS status FROM return r , return_status rs WHERE (r.return_status_id = rs.return_status_id) AND r.return_id = '0' AND rs.language_id = '0';
SELECT rh.date_added, rs.name AS status, rh.comment, rh.notify FROM return_history rh , return_status rs WHERE rh.return_status_id = rs.return_status_id AND rh.return_id = '0' AND rs.language_id = '0' ORDER BY rh.date_added ASC ;
SELECT COUNT(*) AS total FROM return_history WHERE return_id = '0';
SELECT COUNT(*) AS total FROM return_history WHERE return_status_id = '0' GROUP BY return_id;
SELECT * FROM voucher_theme vt , voucher_theme_description vtd WHERE (vt.voucher_theme_id = vtd.voucher_theme_id) AND vt.voucher_theme_id = '0' AND vtd.language_id = '0';
SELECT * FROM voucher_theme vt , voucher_theme_description vtd WHERE (vt.voucher_theme_id = vtd.voucher_theme_id) AND vtd.language_id = '0' ORDER BY vtd.name;
SELECT * FROM voucher_theme vt , voucher_theme_description vtd WHERE (vt.voucher_theme_id = vtd.voucher_theme_id) AND vtd.language_id = '0' ORDER BY vtd.name;
SELECT * FROM voucher_theme_description WHERE voucher_theme_id = '0';
SELECT COUNT(*) AS total FROM voucher_theme;
SELECT  * FROM customer WHERE customer_id = '0';
SELECT  * FROM customer WHERE LCASE(email) = '0';
--SELECT *, CONCAT(c.firstname, ' ', c.lastname) AS name, cgd.name AS customer_group FROM customer c , customer_group_description cgd WHERE (c.customer_group_id = cgd.customer_group_id) AND cgd.language_id = '0';
SELECT customer_id FROM customer_ip WHERE ip = '0';
SELECT * FROM address WHERE address_id = '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
SELECT address_id FROM address WHERE customer_id = '0';
SELECT COUNT(*) AS total FROM customer;
SELECT customer_id FROM customer_ip WHERE ip = '0';
SELECT COUNT(*) AS total FROM customer WHERE status = '0' OR approved = '0';
SELECT COUNT(*) AS total FROM address WHERE customer_id = '0';
SELECT COUNT(*) AS total FROM address WHERE country_id = '0';
SELECT COUNT(*) AS total FROM address WHERE zone_id = '0';
SELECT COUNT(*) AS total FROM customer WHERE customer_group_id = '0';
SELECT comment, date_added FROM customer_history WHERE customer_id = '0' ORDER BY date_added DESC ;
SELECT COUNT(*) AS total FROM customer_history WHERE customer_id = '0';
SELECT * FROM customer_transaction WHERE customer_id = '0' ORDER BY date_added DESC ;
SELECT COUNT(*) AS total  FROM customer_transaction WHERE customer_id = '0';
SELECT SUM(amount) AS total FROM customer_transaction WHERE customer_id = '0';
SELECT COUNT(*) AS total FROM customer_transaction WHERE order_id = '0';
SELECT * FROM customer_reward WHERE customer_id = '0' ORDER BY date_added DESC ;
SELECT COUNT(*) AS total FROM customer_reward WHERE customer_id = '0';
SELECT SUM(points) AS total FROM customer_reward WHERE customer_id = '0';
SELECT COUNT(*) AS total FROM customer_reward WHERE order_id = '0';
SELECT * FROM customer_ip WHERE customer_id = '0';
SELECT COUNT(*) AS total FROM customer_ip WHERE ip = '0';
SELECT COUNT(*) AS total FROM customer_ban_ip WHERE ip = '0';
SELECT * FROM myorder WHERE order_status_id > '0' AND order_id = '0';
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM myorder WHERE order_status_id > '0' AND order_id = '0';
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
--SELECT *, (SELECT CONCAT(c.firstname, ' ', c.lastname) FROM customer c WHERE c.customer_id = o.customer_id) AS customer FROM myorder o WHERE o.order_id = '0';
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
--SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, (SELECT os.name FROM order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '0') AS status, o.total, o.currency_code, o.currency_value, o.date_added, o.date_modified FROM myorder o;
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_option_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_download WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_voucher WHERE order_id = '0';
SELECT * FROM order_voucher WHERE voucher_id = '0';
SELECT * FROM order_total WHERE order_id = '0' ORDER BY sort_order;
SELECT COUNT(*) AS total FROM myorder;
SELECT COUNT(*) AS total FROM myorder WHERE store_id = '0';
SELECT COUNT(*) AS total FROM myorder WHERE order_status_id = '0' AND order_status_id > '0';
SELECT COUNT(*) AS total FROM myorder WHERE language_id = '0' AND order_status_id > '0';
SELECT COUNT(*) AS total FROM myorder WHERE currency_id = '0' AND order_status_id > '0';
SELECT SUM(total) AS total FROM myorder WHERE order_status_id > '0';




SELECT SUM(total) AS total FROM myorder WHERE order_status_id > '0' AND YEAR(date_added) = '0';








SELECT MAX(invoice_no) AS invoice_no FROM myorder WHERE invoice_prefix = '0';
SELECT * FROM order_status WHERE order_status_id = '0' AND language_id = '0';
SELECT oh.date_added, os.name AS status, oh.comment, oh.notify FROM order_history oh , order_status os WHERE oh.order_status_id = os.order_status_id AND oh.order_id = '0' AND os.language_id = '0' ORDER BY oh.date_added ASC ;
SELECT COUNT(*) AS total FROM order_history WHERE order_id = '0';
SELECT COUNT(*) AS total FROM order_history WHERE order_status_id = '0';
SELECT  email FROM myorder o , order_product op WHERE (o.order_id = op.order_id) AND (0 OR 0) AND o.order_status_id <> '0';
SELECT  email FROM myorder o , order_product op WHERE (o.order_id = op.order_id) AND (0 OR 0) AND o.order_status_id <> '0' ;
SELECT  * FROM voucher WHERE voucher_id = '0';
SELECT  * FROM voucher WHERE code = '0';
SELECT v.voucher_id, v.code, v.from_name, v.from_email, v.to_name, v.to_email, (SELECT vtd.name FROM voucher_theme_description vtd WHERE vtd.voucher_theme_id = v.voucher_theme_id AND vtd.language_id = '0') AS theme, v.amount, v.status, v.date_added FROM voucher v;
SELECT COUNT(*) AS total FROM voucher;
SELECT COUNT(*) AS total FROM voucher WHERE voucher_theme_id = '0';
--SELECT vh.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, vh.amount, vh.date_added FROM voucher_history vh , myorder o WHERE (vh.order_id = o.order_id) AND vh.voucher_id = '0' ORDER BY vh.date_added ASC ;
SELECT COUNT(*) AS total FROM voucher_history WHERE voucher_id = '0';
--SELECT ot.*, ( SELECT count(ot2.paypal_iframe_order_id) FROM paypal_iframe_order_transaction ot2 WHERE ot2.parent_transaction_id = ot.transaction_id ) AS children FROM paypal_iframe_order_transaction ot WHERE paypal_iframe_order_id = '0';
--SELECT SUM(amount) AS amount FROM paypal_iframe_order_transaction WHERE paypal_iframe_order_id = '0' AND pending_reason != 'authorization' AND (payment_status = 'Partially-Refunded' OR payment_status = 'Completed' OR payment_status = 'Pending') AND transaction_entity = 'payment';
--SELECT SUM(amount) AS amount FROM paypal_iframe_order_transaction WHERE paypal_iframe_order_id = '0' AND payment_status = 'Refunded';
--SELECT SUM(amount) AS amount FROM paypal_iframe_order_transaction WHERE parent_transaction_id = '0' AND payment_type = 'refund';
--SELECT * FROM paypal_iframe_order WHERE order_id = '0' ;
--SELECT o.order_id FROM paypal_iframe_order_transaction ot , paypal_iframe_order o  WHERE o.paypal_iframe_order_id = ot.paypal_iframe_order_id  AND ot.transaction_id = '0' ;
/*SELECT submission_id, status, text FROM order_amazon_report WHERE order_id = '0';
SELECT amazon_order_id FROM order_amazon WHERE order_id = '0';
SELECT oap.order_product_id, amazon_order_item_code, op.quantity FROM order_amazon_product oap , order_product op USING(order_product_id) WHERE order_id = '0';
*/
--SELECT SUM(amount) AS amount FROM paypal_order_transaction WHERE paypal_order_id = '0' AND pending_reason != 'authorization' AND (payment_status = 'Partially-Refunded' OR payment_status = 'Completed' OR payment_status = 'Pending') AND transaction_entity = 'payment';
--SELECT SUM(amount) AS amount FROM paypal_order_transaction WHERE paypal_order_id = '0' AND payment_status = 'Refunded';
--SELECT SUM(amount) AS amount FROM paypal_order_transaction WHERE parent_transaction_id = '0' AND payment_type = 'refund';
--SELECT * FROM paypal_order WHERE order_id = '0' ;
--SELECT ot.*, (SELECT count(ot2.paypal_order_id) FROM paypal_order_transaction ot2 WHERE ot2.parent_transaction_id = ot.transaction_id ) AS children FROM paypal_order_transaction ot WHERE paypal_order_id = '0';
--SELECT o.order_id FROM paypal_order_transaction ot , paypal_order o  WHERE o.paypal_order_id = ot.paypal_order_id  AND ot.transaction_id = '0' ;
--SELECT * FROM paypal_payflow_iframe_order WHERE order_id = '0';
/*SELECT * FROM amazon_product;
SELECT * FROM amazon_product;
SELECT category FROM amazon_product;
SELECT messages FROM amazon_product;
SELECT sku, insertion_id FROM amazon_product;
SELECT * FROM amazon_product_error;
SELECT product_id, sku FROM amazon_product;
SELECT COUNT(*) as 'count' FROM amazon_product_link WHERE product_id = '0' AND amazon_sku = '0' ;
SELECT insertion_id FROM amazon_product;
SELECT * FROM amazon_product_link WHERE product_id = 0 AND var = '0';
*/
SELECT * FROM custom_field cf , custom_field_description cfd WHERE (cf.custom_field_id = cfd.custom_field_id) AND cf.custom_field_id = '0' AND cfd.language_id = '0';
SELECT * FROM custom_field cf , custom_field_description cfd WHERE (cf.custom_field_id = cfd.custom_field_id) AND cfd.language_id = '0';
SELECT * FROM custom_field_description WHERE custom_field_id = '0';
SELECT * FROM custom_field_value cfv , custom_field_value_description cfvd WHERE (cfv.custom_field_value_id = cfvd.custom_field_value_id) AND cfv.custom_field_value_id = '0' AND cfvd.language_id = '0';
SELECT * FROM custom_field_value cfv , custom_field_value_description cfvd WHERE (cfv.custom_field_value_id = cfvd.custom_field_value_id) AND cfv.custom_field_id = '0' AND cfvd.language_id = '0' ORDER BY cfv.sort_order ASC;
SELECT * FROM custom_field_value WHERE custom_field_id = '0';
SELECT * FROM custom_field_value_description WHERE custom_field_value_id = '0';
SELECT COUNT(*) AS total FROM custom_field;
SELECT  * FROM banner WHERE banner_id = '0';
SELECT * FROM banner;
SELECT * FROM banner_image WHERE banner_id = '0';
SELECT * FROM banner_image_description WHERE banner_image_id = '0' AND banner_id = '0';
SELECT COUNT(*) AS total FROM banner;
SELECT  * FROM layout WHERE layout_id = '0';
SELECT * FROM layout;
SELECT * FROM layout_route WHERE layout_id = '0';
SELECT COUNT(*) AS total FROM layout;
--SELECT * FROM openbay_faq WHERE route = '0';
--SELECT COUNT( p.product_id) AS total FROM product p , product_description pd WHERE (p.product_id = pd.product_id) LEFT JOIN (SELECT product_id, IF( SUM( status ) = 0, 0, 1 ) AS 'listing_status' FROM ebay_listing GROUP BY product_id ) ebay2 ON (p.product_id = ebay2.product_id)";;
--SELECT p.*, pd.* FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN (SELECT product_id, IF( SUM( status ) = 0, 0, 1 ) AS 'listing_status' FROM ebay_listing GROUP BY product_id ) ebay2 ON (p.product_id = ebay2.product_id);
SELECT COUNT(*) AS total FROM myorder;
--SELECT o.order_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, (SELECT os.name FROM order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '0') AS status, o.currency_code, o.currency_value, o.date_added FROM myorder o;
--SELECT o.order_id, o.order_status_id, o.shipping_method, CONCAT(o.firstname, ' ', o.lastname) AS customer, (SELECT os.name FROM order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '0') AS status, o.currency_code, o.currency_value, o.date_added FROM myorder o WHERE o.order_id = '0' ;

--SELECT * FROM amazonus_product;
--SELECT * FROM amazonus_product;
SELECT customer_id FROM customer WHERE email = '0';
SELECT * FROM url_alias WHERE keyword = '0';
SELECT * FROM url_alias WHERE query = '0';
SELECT * FROM url_alias WHERE query = 'category_id=0';
SELECT * FROM country WHERE iso_code_2 = '0' AND status = '1' ;
SELECT * FROM zone WHERE name = '0';
SELECT * FROM country WHERE iso_code_2 = '0' AND status = '1' ;
SELECT * FROM zone WHERE name = '0';
SELECT name, model, price, quantity, tax / price * 100 AS tax_rate FROM order_product WHERE order_id = '0' UNION ALL SELECT '', code, amount, '1', 0.00 FROM order_voucher WHERE order_id = '0';
SELECT value FROM order_total WHERE order_id = '0' AND code = 'klarna_fee';
SELECT name, model, price, quantity, tax / price * 100 AS tax_rate FROM order_product WHERE order_id = '0' UNION ALL SELECT '', code, amount, '1', 0.00 FROM order_voucher WHERE order_id = '0';
--SELECT * FROM amazon_product;
--SELECT * FROM amazon_product;
SELECT customer_id FROM customer WHERE email = '0';
SELECT * FROM store ORDER BY url;
SELECT * FROM extension WHERE type = '0';
SELECT * FROM setting WHERE store_id = '0' AND mygroup = '0';
--SELECT * FROM amazonus_product;
--SELECT * FROM amazonus_product;
--SELECT var FROM amazonus_product;
--SELECT COUNT(*) as 'count' FROM amazonus_product_link WHERE product_id = '0' AND amazonus_sku = '0' ;
SELECT  * FROM address WHERE address_id = '0' AND customer_id = '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
SELECT * FROM address WHERE customer_id = '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
SELECT COUNT(*) AS total FROM address WHERE customer_id = '0';
SELECT * FROM order_download od , myorder o WHERE (od.order_id = o.order_id) AND o.customer_id = '0' AND o.order_status_id > '0' AND o.order_status_id = '0' AND od.order_download_id = '0' AND od.remaining > 0;
SELECT o.order_id, o.date_added, od.order_download_id, od.name, od.filename, od.remaining FROM order_download od , myorder o WHERE (od.order_id = o.order_id) AND o.customer_id = '0' AND o.order_status_id > '0' AND o.order_status_id = '0' AND od.remaining > 0 ORDER BY o.date_added DESC ;
SELECT COUNT(*) AS total FROM order_download od , myorder o WHERE (od.order_id = o.order_id) AND o.customer_id = '0' AND o.order_status_id > '0' AND o.order_status_id = '0' AND od.remaining > 0;
SELECT orc.*,o.payment_method,o.payment_code,o.currency_code FROM order_recurring AS orc , myorder AS o WHERE orc.order_id = o.order_id AND orc.order_recurring_id = '0' AND o.customer_id = '0' ;
SELECT * FROM order_recurring WHERE profile_reference = '0' ;
SELECT * FROM order_recurring_transaction WHERE order_recurring_id = '0';
SELECT orc.*,o.payment_method,o.currency_id,o.currency_value FROM order_recurring AS orc , myorder AS o WHERE orc.order_id = o.order_id AND o.customer_id = '0' ORDER BY o.order_id DESC ;
SELECT COUNT(*) AS total FROM order_recurring AS orc ,myorder AS o WHERE orc.order_id = o.order_id AND o.customer_id = '0';
SELECT  * FROM customer_group cg , customer_group_description cgd WHERE (cg.customer_group_id = cgd.customer_group_id) AND cg.customer_group_id = '0' AND cgd.language_id = '0';
SELECT * FROM customer_group cg , customer_group_description cgd WHERE (cg.customer_group_id = cgd.customer_group_id) AND cgd.language_id = '0' ORDER BY cg.sort_order ASC, cgd.name ASC;
SELECT * FROM customer_reward WHERE customer_id = '0';
SELECT COUNT(*) AS total FROM customer_reward WHERE customer_id = '0';
SELECT SUM(points) AS total FROM customer_reward WHERE customer_id = '0' GROUP BY customer_id;
SELECT * FROM customer_transaction WHERE customer_id = '0';
SELECT COUNT(*) AS total FROM customer_transaction WHERE customer_id = '0';
SELECT SUM(amount) AS total FROM customer_transaction WHERE customer_id = '0' GROUP BY customer_id;
SELECT r.return_id, r.order_id, r.firstname, r.lastname, r.email, r.telephone, r.product, r.model, r.quantity, r.opened, (SELECT rr.name FROM return_reason rr WHERE rr.return_reason_id = r.return_reason_id AND rr.language_id = '0') AS reason, (SELECT ra.name FROM return_action ra WHERE ra.return_action_id = r.return_action_id AND ra.language_id = '0') AS action, (SELECT rs.name FROM return_status rs WHERE rs.return_status_id = r.return_status_id AND rs.language_id = '0') AS status, r.comment, r.date_ordered, r.date_added, r.date_modified FROM return r WHERE return_id = '0' AND customer_id = '0';
SELECT r.return_id, r.order_id, r.firstname, r.lastname, rs.name as status, r.date_added FROM return r, return_status rs WHERE (r.return_status_id = rs.return_status_id) AND r.customer_id = '0' ORDER BY r.return_id DESC ;
SELECT COUNT(*) AS total FROM return WHERE customer_id = '0';
SELECT rh.date_added, rs.name AS status, rh.comment, rh.notify FROM return_history rh , return_status rs WHERE rh.return_status_id = rs.return_status_id AND rh.return_id = '0' AND rs.language_id = '0' ORDER BY rh.date_added ASC;
SELECT * FROM customer WHERE customer_id = '0';
SELECT * FROM customer WHERE LOWER(email) = '0';
SELECT * FROM customer WHERE token = '0' AND token != '';
--SELECT *, CONCAT(c.firstname, ' ', c.lastname) AS name, cg.name AS customer_group FROM customer c , customer_group cg WHERE (c.customer_group_id = cg.customer_group_id);
SELECT customer_id FROM customer_ip WHERE ip = '0';
SELECT COUNT(*) AS total FROM customer WHERE LOWER(email) = '0';
SELECT * FROM customer_ip WHERE customer_id = '0';
SELECT * FROM customer_ban_ip WHERE ip = '0';
SELECT * FROM myorder WHERE order_id = '0' AND customer_id = '0' AND order_status_id > '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
SELECT o.order_id, o.firstname, o.lastname, os.name as status, o.date_added, o.total, o.currency_code, o.currency_value FROM myorder o , order_status os WHERE (o.order_status_id = os.order_status_id) AND o.customer_id = '0' AND o.order_status_id > '0' AND os.language_id = '0' ORDER BY o.order_id DESC ;
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_voucher WHERE order_id = '0';
SELECT * FROM order_total WHERE order_id = '0' ORDER BY sort_order;
SELECT date_added, os.name AS status, oh.comment, oh.notify FROM order_history oh , order_status os WHERE oh.order_status_id = os.order_status_id AND oh.order_id = '0' AND oh.notify = '1' AND os.language_id = '0' ORDER BY oh.date_added;
SELECT * FROM order_download WHERE order_id = '0' ORDER BY name;
SELECT COUNT(*) AS total FROM myorder WHERE customer_id = '0' AND order_status_id > '0';
SELECT COUNT(*) AS total FROM order_product WHERE order_id = '0';
SELECT COUNT(*) AS total FROM order_voucher WHERE order_id = '0';
SELECT * FROM affiliate WHERE affiliate_id = '0';
SELECT * FROM affiliate WHERE LOWER(email) = '0';
SELECT * FROM affiliate WHERE code = '0';
SELECT COUNT(*) AS total FROM affiliate WHERE LOWER(email) = '0';
SELECT * FROM affiliate_transaction WHERE affiliate_id = '0';
SELECT COUNT(*) AS total FROM affiliate_transaction WHERE affiliate_id = '0';
SELECT SUM(amount) AS total FROM affiliate_transaction WHERE affiliate_id = '0' GROUP BY affiliate_id;
SELECT  *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT price FROM product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '0' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC ) AS discount, (SELECT price FROM product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '0' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC ) AS special, (SELECT points FROM product_reward pr WHERE pr.product_id = p.product_id AND customer_group_id = '0') AS reward, (SELECT ss.name FROM stock_status ss WHERE ss.stock_status_id = p.stock_status_id AND ss.language_id = '0') AS stock_status, (SELECT wcd.unit FROM weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '0') AS weight_class, (SELECT lcd.unit FROM length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '0') AS length_class, (SELECT AVG(rating) AS total FROM review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT COUNT(*) AS total FROM review r2 WHERE r2.product_id = p.product_id AND r2.status = '1' GROUP BY r2.product_id) AS reviews, p.sort_order FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '0' AND pd.language_id = '0' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0';
-- GIATI DEN PAIZEI AUTO   SELECT p.product_id, (SELECT AVG(rating) AS total FROM review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT price FROM product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '0' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC ) AS discount, (SELECT price FROM product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '0' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC ) AS special;
SELECT  ps.product_id, (SELECT AVG(rating) FROM review r1 WHERE r1.product_id = ps.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM product_special ps , product p , product_description pd, product_to_store p2s WHERE (ps.product_id = p.product_id) AND (p.product_id = pd.product_id) AND (p.product_id = p2s.product_id) AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND ps.customer_group_id = '0' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) GROUP BY ps.product_id;
SELECT p.product_id FROM product p , product_to_store p2s WHERE (p.product_id = p2s.product_id) AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' ORDER BY p.date_added DESC ;
SELECT p.product_id FROM product p, product_to_store p2s WHERE (p.product_id = p2s.product_id) AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' ORDER BY p.viewed, p.date_added DESC ;
SELECT op.product_id, COUNT(*) AS total FROM order_product op , myorder o , product p, product_to_store p2s  WHERE (op.order_id = o.order_id)  AND (op.product_id = p.product_id)AND (p.product_id = p2s.product_id) AND o.order_status_id > '0' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' GROUP BY op.product_id ORDER BY total DESC ;


























SELECT ag.attribute_group_id, agd.name FROM product_attribute pa LEFT JOIN attribute a ON (pa.attribute_id = a.attribute_id) LEFT JOIN attribute_group ag ON (a.attribute_group_id = ag.attribute_group_id) LEFT JOIN attribute_group_description agd ON (ag.attribute_group_id = agd.attribute_group_id) WHERE pa.product_id = '0' AND agd.language_id = '0' GROUP BY ag.attribute_group_id ORDER BY ag.sort_order, agd.name;
SELECT a.attribute_id, ad.name, pa.text FROM product_attribute pa LEFT JOIN attribute a ON (pa.attribute_id = a.attribute_id) LEFT JOIN attribute_description ad ON (a.attribute_id = ad.attribute_id) WHERE pa.product_id = '0' AND a.attribute_group_id = '0' AND ad.language_id = '0' AND pa.language_id = '0' ORDER BY a.sort_order, ad.name;
SELECT * FROM product_option po LEFT JOIN option o ON (po.option_id = o.option_id) LEFT JOIN option_description od ON (o.option_id = od.option_id) WHERE po.product_id = '0' AND od.language_id = '0' ORDER BY o.sort_order;
SELECT * FROM product_option_value pov LEFT JOIN option_value ov ON (pov.option_value_id = ov.option_value_id) LEFT JOIN option_value_description ovd ON (ov.option_value_id = ovd.option_value_id) WHERE pov.product_id = '0' AND pov.product_option_id = '0' AND ovd.language_id = '0' ORDER BY ov.sort_order;
SELECT * FROM product_discount WHERE product_id = '0' AND customer_group_id = '0' AND quantity > 1 AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY quantity ASC, priority ASC, price ASC;
SELECT * FROM product_image WHERE product_id = '0' ORDER BY sort_order ASC;
SELECT * FROM product_related pr LEFT JOIN product p ON (pr.related_id = p.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pr.product_id = '0' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0';
SELECT * FROM product_to_layout WHERE product_id = '0' AND store_id = '0';
SELECT * FROM product_to_category WHERE product_id = '0';
SELECT pd.* FROM product_profile pp , profile_description pd, profile p WHERE pd.language_id = '0' AND pd.profile_id = pp.profile_id  AND p.profile_id = pd.profile_id AND product_id = '0' AND status = 1 AND customer_group_id = '0' ORDER BY sort_order ASC;
SELECT * FROM profile p , product_profile pp wHERE pp.profile_id = p.profile_id AND pp.product_id = '0' and pp.profile_id = '0' AND status = 1 AND pp.customer_group_id = '0';
SELECT COUNT( ps.product_id) AS total FROM product_special ps LEFT JOIN product p ON (ps.product_id = p.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND ps.customer_group_id = '0' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW()));
SELECT * FROM manufacturer m LEFT JOIN manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m.manufacturer_id = '0' AND m2s.store_id = '0';
SELECT * FROM manufacturer m LEFT JOIN manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m2s.store_id = '0';
SELECT * FROM manufacturer m LEFT JOIN manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE m2s.store_id = '0' ORDER BY name;
SELECT r.review_id, r.author, r.rating, r.text, p.product_id, pd.name, p.price, p.image, r.date_added FROM review r LEFT JOIN product p ON (r.product_id = p.product_id) LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '0' AND p.date_available <= NOW() AND p.status = '1' AND r.status = '1' AND pd.language_id = '0' ORDER BY r.date_added DESC ;
SELECT COUNT(*) AS total FROM review r LEFT JOIN product p ON (r.product_id = p.product_id) LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '0' AND p.date_available <= NOW() AND p.status = '1' AND r.status = '1' AND pd.language_id = '0';
SELECT  * FROM information i LEFT JOIN information_description id ON (i.information_id = id.information_id) LEFT JOIN information_to_store i2s ON (i.information_id = i2s.information_id) WHERE i.information_id = '0' AND id.language_id = '0' AND i2s.store_id = '0' AND i.status = '1';
SELECT * FROM information i LEFT JOIN information_description id ON (i.information_id = id.information_id) LEFT JOIN information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '0' AND i2s.store_id = '0' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC;
SELECT * FROM information_to_layout WHERE information_id = '0' AND store_id = '0';
SELECT  * FROM category c LEFT JOIN category_description cd ON (c.category_id = cd.category_id) LEFT JOIN category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.category_id = '0' AND cd.language_id = '0' AND c2s.store_id = '0' AND c.status = '1';
SELECT * FROM category c LEFT JOIN category_description cd ON (c.category_id = cd.category_id) LEFT JOIN category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.parent_id = '0' AND cd.language_id = '0' AND c2s.store_id = '0'  AND c.status = '1' ORDER BY c.sort_order, LCASE(cd.name);
SELECT filter_id FROM category_filter WHERE category_id = '0';
SELECT  f.filter_group_id, fgd.name, fg.sort_order FROM filter f LEFT JOIN filter_group fg ON (f.filter_group_id = fg.filter_group_id) LEFT JOIN filter_group_description fgd ON (fg.filter_group_id = fgd.filter_group_id) WHERE f.filter_id IN (0) AND fgd.language_id = '0' GROUP BY f.filter_group_id ORDER BY fg.sort_order, LCASE(fgd.name);
SELECT  f.filter_id, fd.name FROM filter f LEFT JOIN filter_description fd ON (f.filter_id = fd.filter_id) WHERE f.filter_id IN ('0') AND f.filter_group_id = '0' AND fd.language_id = '0' ORDER BY f.sort_order, LCASE(fd.name);
SELECT * FROM category_to_layout WHERE category_id = '0' AND store_id = '0';
SELECT COUNT(*) AS total FROM category c LEFT JOIN category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.parent_id = '0' AND c2s.store_id = '0' AND c.status = '1';
SELECT * FROM category, category_description WHERE category.parent_id = '0' AND category_description.name = '0' ;
SELECT * FROM category, category_description WHERE category.parent_id = '0' AND category_description.name = '0' ;
SELECT * FROM category, category_description WHERE category.parent_id = '0' AND category_description.name = '0' ;
SELECT * FROM category, category_description WHERE category.parent_id = '0' AND category_description.name = '0' ;
SELECT * FROM product;

SELECT * FROM option WHERE option_id = '0' ;

SELECT * FROM  product_option WHERE product_id = '0' AND option_id = '0' ;
SELECT * FROM  attribute_group_description WHERE name = '0' AND language_id = '0' ;
SELECT sort_order FROM  attribute_group ORDER BY sort_order DESC ;

SELECT sort_order FROM  attribute ORDER BY sort_order DESC ;
SELECT * FROM product_attribute WHERE product_id = '0' AND attribute_id = '0' AND language_id = '0';
SELECT * FROM  manufacturer WHERE name = '0' ;
SELECT sort_order FROM  manufacturer ORDER BY sort_order DESC ;
SELECT * FROM country WHERE iso_code_2 = '0';
SELECT * FROM customer WHERE email = '0';
--SELECT * FROM ebay_transaction WHERE txn_id = '0' AND item_id = '0' ;
--SELECT * FROM ebay_transaction WHERE order_id = '0';
SELECT order_id FROM order_history WHERE comment = '0' ;
SELECT order_status_id FROM order_history WHERE order_id = '0';
SELECT customer_id FROM myorder WHERE order_id = '0';
SELECT * FROM order_status WHERE order_status_id = '0' AND language_id = '0';
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_download WHERE order_id = '0';
SELECT * FROM order_total WHERE order_id = '0' ORDER BY sort_order ASC;
SELECT * FROM order_status WHERE order_status_id = '0' AND language_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM country WHERE iso_code_2 = '0' ;
--SELECT order_id FROM ebay_order WHERE smp_id = '0' ;
--SELECT * FROM ebay_order_lock WHERE smp_id = '0' ;
SELECT * FROM language WHERE language_id = '0';
SELECT * FROM language ORDER BY sort_order, name;
SELECT * FROM zone WHERE zone_id = '0' AND status = '1';
SELECT * FROM zone WHERE country_id = '0' AND status = '1' ORDER BY name;
SELECT  * FROM currency WHERE code = '0';
SELECT * FROM currency ORDER BY title ASC;
SELECT * FROM return_reason WHERE return_reason_id = '0' AND language_id = '0';
SELECT * FROM return_reason WHERE language_id = '0';
SELECT return_reason_id, name FROM return_reason WHERE language_id = '0' ORDER BY name;
SELECT * FROM return_reason WHERE return_reason_id = '0';
SELECT COUNT(*) AS total FROM return_reason WHERE language_id = '0';
SELECT * FROM country WHERE country_id = '0' AND status = '1';
SELECT * FROM country WHERE status = '1' ORDER BY name ASC;
SELECT * FROM product p;
SELECT * FROM customer ;
SELECT * FROM customer ;
SELECT * FROM currency ;
SELECT * FROM order_status WHERE order_status_id = '0' AND language_id = '0';
SELECT * FROM order_product ;
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_total WHERE order_id = '0' ORDER BY sort_order ASC;
SELECT * FROM order_status WHERE order_status_id = '0' AND language_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM geo_zone ORDER BY name;
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT country_id, name, iso_code_2, iso_code_3, address_format FROM country WHERE iso_code_2 = '0' AND status = 1 ;
-- SELECT zone_id, code FROM zone WHERE (LOWER(name) LIKE '0' ;
--SELECT COUNT(*) AS count FROM order_amazon WHERE order_id =  '0';
--SELECT free_shipping FROM order_amazon WHERE order_id = '0';
--SELECT value + IF(tax IS NULL, 0, tax) AS 'price' FROM order_total ot LEFT JOIN order_total_tax ott USING(order_total_id) WHERE ot.code = 'shipping' AND order_id = '0';
--SELECT ot.title, ot.order_total_id, value + IF(tax IS NULL, 0, tax) AS 'price' FROM order_total ot LEFT JOIN order_total_tax ott USING(order_total_id)  WHERE ott.code NOT IN ('shipping', 'total', 'sub_total', 'tax') AND value > 0 AND order_id = '0';
--INSERT INTO order_total_tax (order_total_id, code, tax) SELECT order_total_id, code, " . (double) $total['cba_tax'] . " FROM order_total WHERE order_id = " . (int) $order_id . " AND code = '0';
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
--SELECT * FROM paypal_order_transaction pt LEFT JOIN paypal_order po ON pt.paypal_order_id = po.paypal_order_id  WHERE pt.transaction_id = '0' ;
--SELECT SUM(amount) AS amount FROM paypal_order_transaction WHERE paypal_order_id = '0' AND pending_reason != 'authorization' AND pending_reason != 'paymentreview' AND (payment_status = 'Partially-Refunded' OR payment_status = 'Completed' OR payment_status = 'Pending') AND transaction_entity = 'payment';
--SELECT SUM(amount) AS amount FROM paypal_order_transaction WHERE paypal_order_id = '0' AND payment_status = 'Refunded';
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
SELECT * FROM zone_to_geo_zone WHERE geo_zone_id = '0' AND country_id = '0' AND (zone_id = '0' OR zone_id = '0');
--SELECT order_id FROM paypal_payflow_iframe_order WHERE secure_token_id = '0';
--SELECT * FROM amazon_product;
--SELECT * FROM amazon_product;
--SELECT var FROM amazon_product;
--SELECT COUNT(*) as 'count' FROM amazon_product_link WHERE product_id = '0' AND amazon_sku = '0' ;
SELECT * FROM coupon WHERE code = '0' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) AND status = '1';
SELECT COUNT(*) AS total FROM coupon_history ch WHERE ch.coupon_id = '0';
SELECT COUNT(*) AS total FROM coupon_history ch WHERE ch.coupon_id = '0' AND ch.customer_id = '0';
SELECT * FROM coupon_product WHERE coupon_id = '0';
SELECT * FROM coupon_category cc LEFT JOIN category_path cp ON (cc.category_id = cp.path_id) WHERE cc.coupon_id = '0';
SELECT COUNT(*) AS total FROM product_to_category WHERE product_id = '0' AND category_id = '0';
SELECT * FROM order_fraud WHERE order_id = '0';
SELECT * FROM voucher_theme vt LEFT JOIN voucher_theme_description vtd ON (vt.voucher_theme_id = vtd.voucher_theme_id) WHERE vt.voucher_theme_id = '0' AND vtd.language_id = '0';
SELECT * FROM voucher_theme vt LEFT JOIN voucher_theme_description vtd ON (vt.voucher_theme_id = vtd.voucher_theme_id) WHERE vtd.language_id = '0' ORDER BY vtd.name;
SELECT * FROM voucher_theme vt LEFT JOIN voucher_theme_description vtd ON (vt.voucher_theme_id = vtd.voucher_theme_id) WHERE vtd.language_id = '0' ORDER BY vtd.name;
SELECT *, (SELECT os.name FROM order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = o.language_id) AS order_status FROM myorder o WHERE o.order_id = '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
SELECT * FROM country WHERE country_id = '0';
SELECT * FROM zone WHERE zone_id = '0';
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_download WHERE order_id = '0';
SELECT * FROM order_voucher WHERE order_id = '0';
SELECT * FROM order_total WHERE order_id = '0' ORDER BY sort_order ASC;
SELECT * FROM order_status WHERE order_status_id = '0' AND language_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
SELECT * FROM order_status WHERE order_status_id = '0' AND language_id = '0';
SELECT *, vtd.name AS theme FROM voucher v LEFT JOIN voucher_theme vt ON (v.voucher_theme_id = vt.voucher_theme_id) LEFT JOIN voucher_theme_description vtd ON (vt.voucher_theme_id = vtd.voucher_theme_id) WHERE v.code = '0' AND v.status = '1';
SELECT * FROM myorder WHERE order_id = '0' AND order_status_id = '0';
SELECT * FROM order_voucher WHERE order_id = '0' AND voucher_id = '0';
SELECT SUM(amount) AS total FROM voucher_history vh WHERE vh.voucher_id = '0' GROUP BY vh.voucher_id;
SELECT *, vtd.name AS theme FROM voucher v LEFT JOIN voucher_theme vt ON (v.voucher_theme_id = vt.voucher_theme_id) LEFT JOIN voucher_theme_description vtd ON (vt.voucher_theme_id = vtd.voucher_theme_id) AND vtd.language_id = '0' WHERE v.order_id = '0';
SELECT * FROM banner_image bi LEFT JOIN banner_image_description bid ON (bi.banner_image_id  = bid.banner_image_id) WHERE bi.banner_id = '0' AND bid.language_id = '0';
SELECT * FROM layout_route WHERE '0' ORDER BY route DESC ;
SELECT quantity, status FROM product;
SELECT * FROM order_product WHERE order_id = '0';
--SELECT stock FROM product_option_relation WHERE product_id = '0' AND var = '0';
SELECT COUNT(*) as countextension FROM extension;
--SELECT * FROM amazon_order WHERE order_id = '0' ;
--SELECT * FROM ebay_setting_option WHERE key = '0' ;
--SELECT ebay_item_id FROM ebay_listing WHERE product_id = '0' AND status = '1' ;
--SELECT ebay_item_id FROM ebay_listing WHERE product_id = '0' AND status = '0' ORDER BY ebay_listing_id DESC ;
--SELECT product_id, ebay_item_id FROM ebay_listing WHERE status = '1';
--SELECT product_id, ebay_item_id FROM ebay_listing WHERE status = '1';
SELECT * FROM product WHERE product_id = '0' ;
--SELECT * FROM product_option_relation WHERE product_id = '0' AND var = '0' ;
--SELECT comment FROM order_history WHERE comment LIKE '[eBay Import:%]' AND order_id = '".$id."' ;
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM product WHERE product_id = '0' ;
SELECT quantity, status FROM product WHERE product_id = '0' ;
--SELECT stock, active FROM product_option_relation WHERE product_id = '0' AND var = '0' ;
--SELECT product_id FROM ebay_listing WHERE ebay_item_id = '0' ;
--SELECT product_id FROM ebay_listing_pending WHERE key = '0' ;
--SELECT SUM(qty) AS total FROM ebay_transaction WHERE product_id = '0' AND order_id = '0' ;
--SELECT * FROM ebay_image_import;
--SELECT * FROM product_option_relation WHERE product_id = '0' AND var = '0' ;
SELECT * FROM product WHERE product_id = '0' ;
--SELECT * FROM ebay_stock_reserve WHERE product_id = '0' AND variant_id = '0' AND item_id = '0'  ;
--SELECT * FROM ebay_shipping;
--SELECT * FROM ebay_order WHERE order_id = '0' ;
--SELECT * FROM ebay_setting_option WHERE key = 'dispatch_time_max' ;
--SELECT * FROM ebay_shipping WHERE ShippingService = '0' ;
SELECT name FROM tax_rate WHERE tax_rate_id = '0';
SELECT tr2.tax_rate_id, tr2.name, tr2.rate, tr2.type, tr1.priority FROM tax_rule tr1 LEFT JOIN tax_rate tr2 ON (tr1.tax_rate_id = tr2.tax_rate_id) INNER JOIN tax_rate_to_customer_group tr2cg ON (tr2.tax_rate_id = tr2cg.tax_rate_id) LEFT JOIN zone_to_geo_zone z2gz ON (tr2.geo_zone_id = z2gz.geo_zone_id) LEFT JOIN geo_zone gz ON (tr2.geo_zone_id = gz.geo_zone_id) WHERE tr1.tax_class_id = '0' AND tr1.based = 'shipping' AND tr2cg.customer_group_id = '0' AND z2gz.country_id = '0' AND (z2gz.zone_id = '0' OR z2gz.zone_id = '0') ORDER BY tr1.priority ASC;
SELECT tr2.tax_rate_id, tr2.name, tr2.rate, tr2.type, tr1.priority FROM tax_rule tr1 LEFT JOIN tax_rate tr2 ON (tr1.tax_rate_id = tr2.tax_rate_id) INNER JOIN tax_rate_to_customer_group tr2cg ON (tr2.tax_rate_id = tr2cg.tax_rate_id) LEFT JOIN zone_to_geo_zone z2gz ON (tr2.geo_zone_id = z2gz.geo_zone_id) LEFT JOIN geo_zone gz ON (tr2.geo_zone_id = gz.geo_zone_id) WHERE tr1.tax_class_id = '0' AND tr1.based = 'payment' AND tr2cg.customer_group_id = '0' AND z2gz.country_id = '0' AND (z2gz.zone_id = '0' OR z2gz.zone_id = '0') ORDER BY tr1.priority ASC;
SELECT tr2.tax_rate_id, tr2.name, tr2.rate, tr2.type, tr1.priority FROM tax_rule tr1 LEFT JOIN tax_rate tr2 ON (tr1.tax_rate_id = tr2.tax_rate_id) INNER JOIN tax_rate_to_customer_group tr2cg ON (tr2.tax_rate_id = tr2cg.tax_rate_id) LEFT JOIN zone_to_geo_zone z2gz ON (tr2.geo_zone_id = z2gz.geo_zone_id) LEFT JOIN geo_zone gz ON (tr2.geo_zone_id = gz.geo_zone_id) WHERE tr1.tax_class_id = '0' AND tr1.based = 'store' AND tr2cg.customer_group_id = '0' AND z2gz.country_id = '0' AND (z2gz.zone_id = '0' OR z2gz.zone_id = '0') ORDER BY tr1.priority ASC;
SELECT * FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '0' AND pd.language_id = '0' AND p.date_available <= NOW() AND p.status = '1';
SELECT po.product_option_id, po.option_id, od.name, o.type FROM product_option po LEFT JOIN option o ON (po.option_id = o.option_id) LEFT JOIN option_description od ON (o.option_id = od.option_id) WHERE po.product_option_id = '0' AND po.product_id = '0' AND od.language_id = '0';
SELECT pov.option_value_id, ovd.name, pov.quantity, pov.subtract, pov.price, pov.price_prefix, pov.points, pov.points_prefix, pov.weight, pov.weight_prefix FROM product_option_value pov LEFT JOIN option_value ov ON (pov.option_value_id = ov.option_value_id) LEFT JOIN option_value_description ovd ON (ov.option_value_id = ovd.option_value_id) WHERE pov.product_option_value_id = '0' AND pov.product_option_id = '0' AND ovd.language_id = '0';
SELECT pov.option_value_id, ovd.name, pov.quantity, pov.subtract, pov.price, pov.price_prefix, pov.points, pov.points_prefix, pov.weight, pov.weight_prefix FROM product_option_value pov LEFT JOIN option_value ov ON (pov.option_value_id = ov.option_value_id) LEFT JOIN option_value_description ovd ON (ov.option_value_id = ovd.option_value_id) WHERE pov.product_option_value_id = '0' AND pov.product_option_id = '0' AND ovd.language_id = '0';
SELECT price FROM product_discount WHERE product_id = '0' AND customer_group_id = '0' AND quantity <= '0' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY quantity DESC, priority ASC, price ASC ;
SELECT price FROM product_special WHERE product_id = '0' AND customer_group_id = '0' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY priority ASC, price ASC ;
SELECT points FROM product_reward WHERE product_id = '0' AND customer_group_id = '0';
SELECT * FROM product_to_download p2d LEFT JOIN download d ON (p2d.download_id = d.download_id) LEFT JOIN download_description dd ON (d.download_id = dd.download_id) WHERE p2d.product_id = '0' AND dd.language_id = '0';
SELECT * FROM profile p , product_profile pp, profile_description pd WHERE pp.profile_id = p.profile_id AND pp.product_id = '0' and pd.profile_id = p.profile_id AND pd.language_id = '0' and pp.profile_id = '0' AND status = 1 AND pp.customer_group_id = '0';
SELECT * FROM currency;
SELECT * FROM affiliate WHERE affiliate_id = '0' AND status = '1';
SELECT * FROM affiliate WHERE email = '0' AND status = '1' AND approved = '1';
SELECT * FROM weight_class wc LEFT JOIN weight_class_description wcd ON (wc.weight_class_id = wcd.weight_class_id) WHERE wcd.language_id = '0';
--SELECT * FROM play_product_insert pi LEFT JOIN product p ON (p.product_id = pi.product_id);
SELECT * FROM order_product WHERE order_id = '0';
--SELECT * FROM play_order WHERE order_id = '0' ;
--SELECT order_id FROM play_order WHERE play_order_id = '0' ;
--SELECT pi.status AS status, p.quantity AS quantity  FROM play_product_insert pi LEFT JOIN product p ON (p.product_id = pi.product_id) WHERE pi.product_id = '0' ;
SELECT order_status_id FROM myorder WHERE order_id = '0' ;
--SELECT * FROM play_order WHERE order_id = '0' AND modified = 1 ;
SELECT * FROM length_class mc LEFT JOIN length_class_description mcd ON (mc.length_class_id = mcd.length_class_id) WHERE mcd.language_id = '0';
--SELECT submission_id FROM order_amazon_report WHERE status = 'processing';
--SELECT order_id FROM order_amazon WHERE amazon_order_id = '0';
--REPLACE INTO order_amazon_product (order_product_id, amazon_order_item_code) SELECT op.order_product_id, '0' FROM order_product op WHERE op.order_product_id = '0';
--SELECT table_name AS c FROM information_schema.tables WHERE table_schema = DATABASE();
SELECT zone_id FROM zone WHERE country_id = '0' AND status = '1' AND name = '0';
SELECT name FROM order_status WHERE order_status_id = '0' AND language_id = '0' ;
SELECT * FROM order_total WHERE order_id = '0' ORDER BY sort_order ASC;
SELECT * FROM order_product WHERE order_id = '0';
SELECT * FROM order_option WHERE order_id = '0' AND order_product_id = '0';
--SELECT sku FROM product_option_relation WHERE product_id = '0' AND var = '0';
SELECT model FROM product WHERE product_id = '0' ;
SELECT * FROM customer WHERE customer_id = '0' AND status = '1';
SELECT * FROM customer_ip WHERE customer_id = '0' AND ip = '0';
SELECT * FROM customer where LOWER(email) = '0' AND status = '1';
SELECT * FROM customer WHERE LOWER(email) = '0' AND status = '1' AND approved = '1';
SELECT SUM(amount) AS total FROM customer_transaction WHERE customer_id = '0';
SELECT SUM(points) AS total FROM customer_reward WHERE customer_id = '0';
SELECT quantity, status FROM product;
SELECT * FROM order_product WHERE order_id = '0';
--SELECT stock FROM product_option_relation WHERE product_id = '0' AND var = '0';
SELECT COUNT(*) as countextension FROM extension;
--SELECT * FROM amazonus_order WHERE order_id = '0' ;
SELECT * FROM user WHERE user_id = '0' AND status = '1';
SELECT permission FROM user_group WHERE user_group_id = '0';
SELECT * FROM user WHERE username = '0' AND status = '1';
SELECT permission FROM user_group WHERE user_group_id = '0';















