Alessandria Asti
pagina < 1234 >


Alessandria Asti

Tutti i coupon dei deal a Alessandria Asti, come risparmiare con le offerte PoinX

Su Poinx trovi tutte le offerte a Alessandria Asti per i migliori deal e coupon Alessandria Asti. Cerca l’affare che desideri a Alessandria Asti. Tutti i giorni trovi il deal adatto a te in una delle categorie di tua scelta. Le offerte sono ordinate per gruppi, oppure puoi visualizzare le promozioni sulla mappa per trovare facilmente i coupon per le offerte a Alessandria Asti più vicine a te.
Copyright © 2010-2012 PoinX S.p.A. Sede Legale: Via Guerrazzi, 9 - 20145 MILANO - C.F. e Registro delle Imprese di Milano n. 06968460961 - P.IVA 06968460961 - n. REA MI-1926480 - Cap. Soc. Euro 800.000 i.v. - La società non e' in stato di liquidazione - La società è a socio unico - PEC: poinxspa@legalmail.it | POINX VACANZE di Poinx S.p.A. – AGENZIA DI VIAGGI – Autorizzazione N. 80646 S.C.I.A. del 22.03.2013 – Ufficio Agenzie di Viaggio e Turismo della Provincia di Milano – Direttore Tecnico: Giovanni Zorzi
Policy sui cookies | Codice Etico del Gruppo | Policy sulla Privacy

(default) 124 queries took 327 ms
NrQueryErrorAffectedNum. rowsTook (ms)
1SHOW FULL COLUMNS FROM `deals`66664
2SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE COLLATION_NAME= 'utf8_general_ci';111
3SHOW FULL COLUMNS FROM `cities`18181
4SHOW FULL COLUMNS FROM `categories`12121
5SHOW FULL COLUMNS FROM `macro_categories`221
6SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE COLLATION_NAME= 'utf8_unicode_ci';111
7SHOW FULL COLUMNS FROM `shops`37372
8SHOW FULL COLUMNS FROM `vatrates`551
9SHOW FULL COLUMNS FROM `invoices`15151
10SHOW FULL COLUMNS FROM `invoice_lines`12121
11SHOW FULL COLUMNS FROM `sellers`441
12SHOW FULL COLUMNS FROM `channels`331
13SHOW FULL COLUMNS FROM `purchases`39392
14SHOW FULL COLUMNS FROM `users`40402
15SHOW FULL COLUMNS FROM `partners`24242
16SHOW FULL COLUMNS FROM `api_applications`21211
17SHOW FULL COLUMNS FROM `coupons`11111
18SHOW FULL COLUMNS FROM `deliverydatas`16161
19SHOW FULL COLUMNS FROM `traveldatas`13131
20SHOW FULL COLUMNS FROM `newsletter_planners`551
21SHOW FULL COLUMNS FROM `parameters`331
22SHOW FULL COLUMNS FROM `cc_texts`10101
23SHOW FULL COLUMNS FROM `logs`441
24SHOW FULL COLUMNS FROM `stopwords`221
25SHOW FULL COLUMNS FROM `banners`991
26SHOW FULL COLUMNS FROM `extcoupons`771
27SHOW FULL COLUMNS FROM `bonuses`10101
28SHOW FULL COLUMNS FROM `newsletter_subscriptions`38382
29SHOW FULL COLUMNS FROM `py_requests`10101
30SHOW FULL COLUMNS FROM `py_request_cities`882
31SHOW FULL COLUMNS FROM `py_request_associations`441
32SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`main` > 0 51511
33SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE 1 = 1 ORDER BY `City`.`active` DESC, `City`.`cityname` ASC 1131131
34SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`id` = 59 LIMIT 1111
35SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`id` = 59 LIMIT 1111
36SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`id` = 59 LIMIT 1111
37SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`status` = 'A' AND `Deal`.`startdate` <= '2014-08-22' AND `Deal`.`enddate` >= '2014-08-22' AND `Deal`.`city_id` = 59 AND `Deal`.`dealtype` = 'L' AND `Deal`.`sidedeal` = 0 ORDER BY `Category`.`categoryname` ASC 72772764
38SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 52 LIMIT 11123
39SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 36 LIMIT 1110
40SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 23 LIMIT 1111
41SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 28 LIMIT 1111
42SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 25 LIMIT 1111
43SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 35 LIMIT 1111
44SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 38 LIMIT 1111
45SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 31 LIMIT 1111
46SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 30 LIMIT 1111
47SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 33 LIMIT 1111
48SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 48 LIMIT 1111
49SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 20 LIMIT 1111
50SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 26 LIMIT 1111
51SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 29 LIMIT 1111
52SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 24 LIMIT 1111
53SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 8 LIMIT 1111
54SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 46 LIMIT 1111
55SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 2 LIMIT 1111
56SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 47 LIMIT 1111
57SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 43 LIMIT 1111
58SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 51 LIMIT 1111
59SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 27 LIMIT 1111
60SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 40 LIMIT 1111
61SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 0 LIMIT 1001
62select distinct c.id as macro_category_id, c.macrocategoryname, b.id as category_id, b.categoryname as categoryname, b.categorylabel as categorylabel, a.topic as topic from deals a left join categories b on a.category_id = b.id left join macro_categories c on b.macro_category_id = c.id where a.status = 'A' and a.city_id = 59 and a.startdate <= '2014-08-22' and a.enddate >= '2014-08-22' and a.sidedeal = 0 order by c.macrocategoryname, b.categoryname, a.topic1061061
63SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`id` = 2 LIMIT 1111
64SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`main` > 0 51511
65SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE 1 = 1 ORDER BY `City`.`active` DESC, `City`.`cityname` ASC 1131131
66SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`id` = 2 LIMIT 1111
67SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`id` = 2 LIMIT 1111
68SELECT `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id` FROM `cities` AS `City` WHERE `City`.`id` = 2 LIMIT 1111
69SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`status` = 'A' AND `Deal`.`startdate` <= '2014-08-22' AND `Deal`.`enddate` >= '2014-08-22' AND `Deal`.`city_id` = 2 AND `Deal`.`dealtype` = 'L' AND `Deal`.`sidedeal` = 0 ORDER BY `Category`.`categoryname` ASC 56566
70SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 23 LIMIT 1112
71SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 28 LIMIT 1110
72SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 25 LIMIT 1111
73SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 26 LIMIT 1111
74SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 29 LIMIT 1111
75SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 8 LIMIT 1111
76SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 2 LIMIT 1111
77SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 27 LIMIT 1111
78SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 40 LIMIT 1111
79SELECT `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `MacroCategory`.`id`, `MacroCategory`.`macrocategoryname` FROM `categories` AS `Category` LEFT JOIN `macro_categories` AS `MacroCategory` ON (`Category`.`macro_category_id` = `MacroCategory`.`id`) WHERE `Category`.`id` = 0 LIMIT 1001
80select distinct c.id as macro_category_id, c.macrocategoryname, b.id as category_id, b.categoryname as categoryname, b.categorylabel as categorylabel, a.topic as topic from deals a left join categories b on a.category_id = b.id left join macro_categories c on b.macro_category_id = c.id where a.status = 'A' and a.city_id = 2 and a.startdate <= '2014-08-22' and a.enddate >= '2014-08-22' and a.sidedeal = 0 order by c.macrocategoryname, b.categoryname, a.topic24241
81SELECT `Parameter`.`id`, `Parameter`.`name`, `Parameter`.`value` FROM `parameters` AS `Parameter` WHERE `Parameter`.`name` = 'seo_city_h1' LIMIT 1111
82SELECT `Parameter`.`id`, `Parameter`.`name`, `Parameter`.`value` FROM `parameters` AS `Parameter` WHERE `Parameter`.`name` = 'seo_city_title' LIMIT 1111
83SELECT `Parameter`.`id`, `Parameter`.`name`, `Parameter`.`value` FROM `parameters` AS `Parameter` WHERE `Parameter`.`name` = 'seo_city_txt' LIMIT 1111
84SELECT `Parameter`.`id`, `Parameter`.`name`, `Parameter`.`value` FROM `parameters` AS `Parameter` WHERE `Parameter`.`name` = 'seo_city_keywords' LIMIT 1111
85SELECT `Parameter`.`id`, `Parameter`.`name`, `Parameter`.`value` FROM `parameters` AS `Parameter` WHERE `Parameter`.`name` = 'seo_city_description' LIMIT 1111
86SELECT COUNT(*) AS `count` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`status` = 'A' AND `Deal`.`parent_id` = 0 AND `Deal`.`startdate` <= '2014-08-22' AND `Deal`.`enddate` >= '2014-08-22' AND `Channel`.`visible` = 1 AND `Deal`.`city_id` = 2 AND `Deal`.`sidedeal` = 0 1145
87SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`status` = 'A' AND `Deal`.`parent_id` = 0 AND `Deal`.`startdate` <= '2014-08-22' AND `Deal`.`enddate` >= '2014-08-22' AND `Channel`.`visible` = 1 AND `Deal`.`city_id` = 2 AND `Deal`.`sidedeal` = 0 ORDER BY `Deal`.`dealtype` ASC, `Deal`.`prioritysite` DESC, `Deal`.`startdate`*(`Deal`.`dealtype`="D") DESC, `Deal`.`rnd` ASC LIMIT 12121247
88SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 29702 OR b.parent_id = 29702) AND (a.status='A' OR a.status='C')111
89SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 29702 LIMIT 1113
90SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 29702 LIMIT 1111
91SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 29671 OR b.parent_id = 29671) AND (a.status='A' OR a.status='C')111
92SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 29671 LIMIT 1113
93SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 29671 LIMIT 1111
94SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 26489 OR b.parent_id = 26489) AND (a.status='A' OR a.status='C')111
95SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 26489 LIMIT 1111
96SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 26489 LIMIT 1111
97SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 23919 OR b.parent_id = 23919) AND (a.status='A' OR a.status='C')111
98SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 23919 LIMIT 1111
99SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 23919 LIMIT 1111
100SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 22231 OR b.parent_id = 22231) AND (a.status='A' OR a.status='C')111
101SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 22231 LIMIT 1112
102SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 22231 LIMIT 1111
103SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 24068 OR b.parent_id = 24068) AND (a.status='A' OR a.status='C')111
104SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 24068 LIMIT 1113
105SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 24068 LIMIT 1111
106SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 17061 OR b.parent_id = 17061) AND (a.status='A' OR a.status='C')111
107SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 17061 LIMIT 1113
108SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 17061 LIMIT 1111
109SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 25341 OR b.parent_id = 25341) AND (a.status='A' OR a.status='C')111
110SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 25341 LIMIT 1112
111SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 25341 LIMIT 1111
112SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 28391 OR b.parent_id = 28391) AND (a.status='A' OR a.status='C')111
113SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 28391 LIMIT 1112
114SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 28391 LIMIT 1111
115SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 28676 OR b.parent_id = 28676) AND (a.status='A' OR a.status='C')111
116SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 28676 LIMIT 1112
117SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 28676 LIMIT 1111
118SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 28671 OR b.parent_id = 28671) AND (a.status='A' OR a.status='C')111
119SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 28671 LIMIT 1113
120SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 28671 LIMIT 1111
121SELECT sum(quantity) as q FROM purchases a left join deals b on a.deal_id = b.id where (b.id = 25841 OR b.parent_id = 25841) AND (a.status='A' OR a.status='C')111
122SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 25841 LIMIT 1112
123SELECT `Deal`.`id`, `Deal`.`city_id`, `Deal`.`sidedeal`, `Deal`.`title`, `Deal`.`ivalue`, `Deal`.`pvalue`, `Deal`.`minpurchases`, `Deal`.`maxpurchases`, `Deal`.`maxperuser`, `Deal`.`startdate`, `Deal`.`enddate`, `Deal`.`description`, `Deal`.`terms`, `Deal`.`info`, `Deal`.`shop_id`, `Deal`.`image`, `Deal`.`additionalinfo`, `Deal`.`status`, `Deal`.`priority`, `Deal`.`prioritysite`, `Deal`.`shorttitle`, `Deal`.`redeemafter`, `Deal`.`seller_id`, `Deal`.`sellershare`, `Deal`.`poinxshare`, `Deal`.`redeembefore`, `Deal`.`sampledeal`, `Deal`.`emailtitle`, `Deal`.`sellerfee`, `Deal`.`useexternalcoupons`, `Deal`.`couponinstructions`, `Deal`.`editor`, `Deal`.`norecent`, `Deal`.`dealtype`, `Deal`.`sendemailon`, `Deal`.`category_id`, `Deal`.`newcategory`, `Deal`.`subcategory`, `Deal`.`tag`, `Deal`.`newtitle`, `Deal`.`subtitle`, `Deal`.`topic`, `Deal`.`travel`, `Deal`.`rnd`, `Deal`.`mustinvitefriends`, `Deal`.`inotes`, `Deal`.`collectdeliverydata`, `Deal`.`noshowshop`, `Deal`.`gmap`, `Deal`.`externalurl`, `Deal`.`parent_id`, `Deal`.`unit_quantity`, `Deal`.`keywords`, `Deal`.`lastchanged`, `Deal`.`channel_id`, `Deal`.`restartdate`, `Deal`.`issensible`, `Deal`.`traveltype`, `Deal`.`invoicetype`, `Deal`.`sendspecialemailon`, `Deal`.`specialpriority`, `Deal`.`topdeal`, `Deal`.`nofeeds`, `Deal`.`holidayspecial`, `Deal`.`giftcarddeal`, `Deal`.`lastmodified`, `ParentDeal`.`id`, `ParentDeal`.`city_id`, `ParentDeal`.`sidedeal`, `ParentDeal`.`title`, `ParentDeal`.`ivalue`, `ParentDeal`.`pvalue`, `ParentDeal`.`minpurchases`, `ParentDeal`.`maxpurchases`, `ParentDeal`.`maxperuser`, `ParentDeal`.`startdate`, `ParentDeal`.`enddate`, `ParentDeal`.`description`, `ParentDeal`.`terms`, `ParentDeal`.`info`, `ParentDeal`.`shop_id`, `ParentDeal`.`image`, `ParentDeal`.`additionalinfo`, `ParentDeal`.`status`, `ParentDeal`.`priority`, `ParentDeal`.`prioritysite`, `ParentDeal`.`shorttitle`, `ParentDeal`.`redeemafter`, `ParentDeal`.`seller_id`, `ParentDeal`.`sellershare`, `ParentDeal`.`poinxshare`, `ParentDeal`.`redeembefore`, `ParentDeal`.`sampledeal`, `ParentDeal`.`emailtitle`, `ParentDeal`.`sellerfee`, `ParentDeal`.`useexternalcoupons`, `ParentDeal`.`couponinstructions`, `ParentDeal`.`editor`, `ParentDeal`.`norecent`, `ParentDeal`.`dealtype`, `ParentDeal`.`sendemailon`, `ParentDeal`.`category_id`, `ParentDeal`.`newcategory`, `ParentDeal`.`subcategory`, `ParentDeal`.`tag`, `ParentDeal`.`newtitle`, `ParentDeal`.`subtitle`, `ParentDeal`.`topic`, `ParentDeal`.`travel`, `ParentDeal`.`rnd`, `ParentDeal`.`mustinvitefriends`, `ParentDeal`.`inotes`, `ParentDeal`.`collectdeliverydata`, `ParentDeal`.`noshowshop`, `ParentDeal`.`gmap`, `ParentDeal`.`externalurl`, `ParentDeal`.`parent_id`, `ParentDeal`.`unit_quantity`, `ParentDeal`.`keywords`, `ParentDeal`.`lastchanged`, `ParentDeal`.`channel_id`, `ParentDeal`.`restartdate`, `ParentDeal`.`issensible`, `ParentDeal`.`traveltype`, `ParentDeal`.`invoicetype`, `ParentDeal`.`sendspecialemailon`, `ParentDeal`.`specialpriority`, `ParentDeal`.`topdeal`, `ParentDeal`.`nofeeds`, `ParentDeal`.`holidayspecial`, `ParentDeal`.`giftcarddeal`, `ParentDeal`.`lastmodified`, `City`.`id`, `City`.`cityname`, `City`.`normalizedname`, `City`.`active`, `City`.`facebook_url`, `City`.`twitter_url`, `City`.`main`, `City`.`seoh1`, `City`.`seotext`, `City`.`seokeywords`, `City`.`seodescription`, `City`.`closestactive`, `City`.`lastdailynwldate`, `City`.`lastweeklynwldate`, `City`.`lastemvdailycampaign`, `City`.`lastemvweeklycampaign`, `City`.`seotitle`, `City`.`region_id`, `Category`.`id`, `Category`.`categoryname`, `Category`.`description`, `Category`.`seoh1`, `Category`.`seotext`, `Category`.`seokeywords`, `Category`.`macro_category_id`, `Category`.`categorylabel`, `Category`.`seodescription`, `Category`.`seotitle`, `Category`.`active`, `Category`.`invisibleonpoinxyou`, `Shop`.`id`, `Shop`.`shopname`, `Shop`.`shopaddress`, `Shop`.`shopzip`, `Shop`.`shopcity`, `Shop`.`shopstate`, `Shop`.`shopphone`, `Shop`.`shopfax`, `Shop`.`shopemail`, `Shop`.`shopweb`, `Shop`.`shoplatitude`, `Shop`.`shoplongitude`, `Shop`.`invoicename`, `Shop`.`invoiceaddress`, `Shop`.`invoicezip`, `Shop`.`invoicecity`, `Shop`.`invoicecountry`, `Shop`.`couponemail`, `Shop`.`vatcode`, `Shop`.`iban`, `Shop`.`cfisc`, `Shop`.`contact`, `Shop`.`inotes`, `Shop`.`editor`, `Shop`.`mobile`, `Shop`.`paymentname`, `Shop`.`paymentbank`, `Shop`.`paymentaccount`, `Shop`.`paymentagency`, `Shop`.`paymentcheckcode`, `Shop`.`securitycode`, `Shop`.`stoppayments`, `Shop`.`nowire`, `Shop`.`invoicenation`, `Shop`.`fchk`, `Shop`.`vatrate_id`, `Shop`.`lastmodified`, `Seller`.`id`, `Seller`.`sellername`, `Seller`.`email`, `Seller`.`active`, `Channel`.`id`, `Channel`.`description`, `Channel`.`visible` FROM `deals` AS `Deal` LEFT JOIN `deals` AS `ParentDeal` ON (`Deal`.`parent_id` = `ParentDeal`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `categories` AS `Category` ON (`Deal`.`category_id` = `Category`.`id`) LEFT JOIN `shops` AS `Shop` ON (`Deal`.`shop_id` = `Shop`.`id`) LEFT JOIN `sellers` AS `Seller` ON (`Deal`.`seller_id` = `Seller`.`id`) LEFT JOIN `channels` AS `Channel` ON (`Deal`.`channel_id` = `Channel`.`id`) WHERE `Deal`.`id` = 25841 LIMIT 1111
124SELECT `Banner`.`id`, `Banner`.`bannertype`, `Banner`.`bannerimage`, `Banner`.`description`, `Banner`.`startdate`, `Banner`.`enddate`, `Banner`.`url`, `Banner`.`clicks`, `Banner`.`clickers` FROM `banners` AS `Banner` WHERE `Banner`.`bannertype` = 'C' AND `Banner`.`startdate` <= '2014-08-22' AND `Banner`.`enddate` >= '2014-08-22' LIMIT 1111
Notice (8): Undefined variable: sub [APP/views/layouts/default.ctp, line 99]
No Facebook configuration detected. Please add the facebook configuration file to your config folder.