|
1 | 1 | [37mSELECT[0m |
2 | 2 | customer_id[0m,[0m |
3 | 3 | customer_name[0m,[0m |
4 | | - [37mCOUNT[0m(order_id[0m) [37mas[0m total[0m |
| 4 | + [37mCOUNT[0m(order_id[0m) [37mAS[0m total[0m |
5 | 5 | [37mFROM[0m |
6 | 6 | customers[0m |
7 | 7 | [37mINNER JOIN[0m orders[0m [37mON[0m customers[0m.[0mcustomer_id[0m =[0m orders[0m.[0mcustomer_id[0m |
|
21 | 21 | ( |
22 | 22 | [37mSELECT[0m |
23 | 23 | customer_id[0m,[0m |
24 | | - [37mcount[0m(order_id[0m) [37mAs[0m total[0m |
| 24 | + [37mCOUNT[0m(order_id[0m) [37mAS[0m total[0m |
25 | 25 | [37mFROM[0m |
26 | 26 | orders[0m |
27 | 27 | [37mGROUP BY[0m |
28 | 28 | customer_id[0m |
29 | | - ) [37mAs[0m ordersummary[0m |
| 29 | + ) [37mAS[0m ordersummary[0m |
30 | 30 | [37mWHERE[0m |
31 | 31 | customers[0m.[0mcustomer_id[0m =[0m ordersummary[0m.[0mcustomer_id[0m |
32 | 32 | --- |
|
44 | 44 | [37mNAMES[0m [34;1m'utf8'[0m;[0m |
45 | 45 | --- |
46 | 46 | [37mCREATE[0m [37mTABLE[0m [35;1m`PREFIX_address`[0m ( |
47 | | - [35;1m`id_address`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mauto_increment[0m,[0m |
48 | | - [35;1m`id_country`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m,[0m |
49 | | - [35;1m`id_state`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mdefault[0m [37mNULL[0m,[0m |
50 | | - [35;1m`id_customer`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mdefault[0m [34;1m'0'[0m,[0m |
51 | | - [35;1m`id_manufacturer`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mdefault[0m [34;1m'0'[0m,[0m |
52 | | - [35;1m`id_supplier`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mdefault[0m [34;1m'0'[0m,[0m |
53 | | - [35;1m`id_warehouse`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mdefault[0m [34;1m'0'[0m,[0m |
| 47 | + [35;1m`id_address`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mAUTO_INCREMENT[0m,[0m |
| 48 | + [35;1m`id_country`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m,[0m |
| 49 | + [35;1m`id_state`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mDEFAULT[0m [37mNULL[0m,[0m |
| 50 | + [35;1m`id_customer`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 51 | + [35;1m`id_manufacturer`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 52 | + [35;1m`id_supplier`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 53 | + [35;1m`id_warehouse`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
54 | 54 | [35;1m`alias`[0m varchar[0m([32;1m32[0m) [37mNOT[0m [37mNULL[0m,[0m |
55 | | - [35;1m`company`[0m varchar[0m([32;1m64[0m) [37mdefault[0m [37mNULL[0m,[0m |
| 55 | + [35;1m`company`[0m varchar[0m([32;1m64[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
56 | 56 | [35;1m`lastname`[0m varchar[0m([32;1m32[0m) [37mNOT[0m [37mNULL[0m,[0m |
57 | 57 | [35;1m`firstname`[0m varchar[0m([32;1m32[0m) [37mNOT[0m [37mNULL[0m,[0m |
58 | 58 | [35;1m`address1`[0m varchar[0m([32;1m128[0m) [37mNOT[0m [37mNULL[0m,[0m |
59 | | - [35;1m`address2`[0m varchar[0m([32;1m128[0m) [37mdefault[0m [37mNULL[0m,[0m |
60 | | - [35;1m`postcode`[0m varchar[0m([32;1m12[0m) [37mdefault[0m [37mNULL[0m,[0m |
| 59 | + [35;1m`address2`[0m varchar[0m([32;1m128[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
| 60 | + [35;1m`postcode`[0m varchar[0m([32;1m12[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
61 | 61 | [35;1m`city`[0m varchar[0m([32;1m64[0m) [37mNOT[0m [37mNULL[0m,[0m |
62 | 62 | [35;1m`other`[0m text[0m,[0m |
63 | | - [35;1m`phone`[0m varchar[0m([32;1m16[0m) [37mdefault[0m [37mNULL[0m,[0m |
64 | | - [35;1m`phone_mobile`[0m varchar[0m([32;1m16[0m) [37mdefault[0m [37mNULL[0m,[0m |
65 | | - [35;1m`vat_number`[0m varchar[0m([32;1m32[0m) [37mdefault[0m [37mNULL[0m,[0m |
| 63 | + [35;1m`phone`[0m varchar[0m([32;1m16[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
| 64 | + [35;1m`phone_mobile`[0m varchar[0m([32;1m16[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
| 65 | + [35;1m`vat_number`[0m varchar[0m([32;1m32[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
66 | 66 | [35;1m`dni`[0m varchar[0m([32;1m16[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
67 | 67 | [35;1m`date_add`[0m datetime[0m [37mNOT[0m [37mNULL[0m,[0m |
68 | 68 | [35;1m`date_upd`[0m datetime[0m [37mNOT[0m [37mNULL[0m,[0m |
69 | | - [35;1m`active`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mdefault[0m [34;1m'1'[0m,[0m |
70 | | - [35;1m`deleted`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mdefault[0m [34;1m'0'[0m,[0m |
| 69 | + [35;1m`active`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'1'[0m,[0m |
| 70 | + [35;1m`deleted`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
71 | 71 | [37mPRIMARY[0m [37mKEY[0m ([35;1m`id_address`[0m),[0m |
72 | 72 | [37mKEY[0m [35;1m`address_customer`[0m ([35;1m`id_customer`[0m),[0m |
73 | 73 | [37mKEY[0m [35;1m`id_country`[0m ([35;1m`id_country`[0m),[0m |
|
78 | 78 | ) [37mENGINE[0m =[0m [37mENGINE_TYPE[0m [37mDEFAULT[0m [37mCHARSET[0m =[0m utf8[0m |
79 | 79 | --- |
80 | 80 | [37mCREATE[0m [37mTABLE[0m [35;1m`PREFIX_alias`[0m ( |
81 | | - [35;1m`id_alias`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mauto_increment[0m,[0m |
| 81 | + [35;1m`id_alias`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mAUTO_INCREMENT[0m,[0m |
82 | 82 | [35;1m`alias`[0m varchar[0m([32;1m255[0m) [37mNOT[0m [37mNULL[0m,[0m |
83 | 83 | [35;1m`search`[0m varchar[0m([32;1m255[0m) [37mNOT[0m [37mNULL[0m,[0m |
84 | | - [35;1m`active`[0m tinyint[0m([32;1m1[0m) [37mNOT[0m [37mNULL[0m [37mdefault[0m [34;1m'1'[0m,[0m |
| 84 | + [35;1m`active`[0m tinyint[0m([32;1m1[0m) [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'1'[0m,[0m |
85 | 85 | [37mPRIMARY[0m [37mKEY[0m ([35;1m`id_alias`[0m),[0m |
86 | 86 | [37mUNIQUE[0m [37mKEY[0m [35;1m`alias`[0m ([35;1m`alias`[0m) |
87 | 87 | ) [37mENGINE[0m =[0m [37mENGINE_TYPE[0m [37mDEFAULT[0m [37mCHARSET[0m =[0m utf8[0m |
88 | 88 | --- |
89 | 89 | [37mCREATE[0m [37mTABLE[0m [35;1m`PREFIX_carrier`[0m ( |
90 | | - [35;1m`id_carrier`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mAUTO_INCREMENT[0m,[0m |
91 | | - [35;1m`id_reference`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m,[0m |
92 | | - [35;1m`id_tax_rules_group`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 90 | + [35;1m`id_carrier`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mAUTO_INCREMENT[0m,[0m |
| 91 | + [35;1m`id_reference`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m,[0m |
| 92 | + [35;1m`id_tax_rules_group`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
93 | 93 | [35;1m`name`[0m varchar[0m([32;1m64[0m) [37mNOT[0m [37mNULL[0m,[0m |
94 | 94 | [35;1m`url`[0m varchar[0m([32;1m255[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
95 | | - [35;1m`active`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
96 | | - [35;1m`deleted`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
97 | | - [35;1m`shipping_handling`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'1'[0m,[0m |
98 | | - [35;1m`range_behavior`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
99 | | - [35;1m`is_module`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
100 | | - [35;1m`is_free`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
101 | | - [35;1m`shipping_external`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
102 | | - [35;1m`need_range`[0m tinyint[0m([32;1m1[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 95 | + [35;1m`active`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 96 | + [35;1m`deleted`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 97 | + [35;1m`shipping_handling`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'1'[0m,[0m |
| 98 | + [35;1m`range_behavior`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 99 | + [35;1m`is_module`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 100 | + [35;1m`is_free`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 101 | + [35;1m`shipping_external`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
| 102 | + [35;1m`need_range`[0m tinyint[0m([32;1m1[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
103 | 103 | [35;1m`external_module_name`[0m varchar[0m([32;1m64[0m) [37mDEFAULT[0m [37mNULL[0m,[0m |
104 | 104 | [35;1m`shipping_method`[0m int[0m([32;1m2[0m) [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
105 | | - [35;1m`position`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mdefault[0m [34;1m'0'[0m,[0m |
| 105 | + [35;1m`position`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'0'[0m,[0m |
106 | 106 | [35;1m`max_width`[0m int[0m([32;1m10[0m) [37mDEFAULT[0m [32;1m0[0m,[0m |
107 | 107 | [35;1m`max_height`[0m int[0m([32;1m10[0m) [37mDEFAULT[0m [32;1m0[0m,[0m |
108 | 108 | [35;1m`max_depth`[0m int[0m([32;1m10[0m) [37mDEFAULT[0m [32;1m0[0m,[0m |
|
114 | 114 | ) [37mENGINE[0m =[0m [37mENGINE_TYPE[0m [37mDEFAULT[0m [37mCHARSET[0m =[0m utf8[0m |
115 | 115 | --- |
116 | 116 | [37mCREATE[0m [37mTABLE[0m [37mIF[0m [37mNOT[0m [37mEXISTS[0m [35;1m`PREFIX_specific_price_rule`[0m ( |
117 | | - [35;1m`id_specific_price_rule`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mAUTO_INCREMENT[0m,[0m |
| 117 | + [35;1m`id_specific_price_rule`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mAUTO_INCREMENT[0m,[0m |
118 | 118 | [35;1m`name`[0m VARCHAR[0m([32;1m255[0m) [37mNOT[0m [37mNULL[0m,[0m |
119 | | - [35;1m`id_shop`[0m int[0m([32;1m11[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'1'[0m,[0m |
120 | | - [35;1m`id_currency`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m,[0m |
121 | | - [35;1m`id_country`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m,[0m |
122 | | - [35;1m`id_group`[0m int[0m([32;1m10[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m,[0m |
123 | | - [35;1m`from_quantity`[0m mediumint[0m([32;1m8[0m) [37munsigned[0m [37mNOT[0m [37mNULL[0m,[0m |
| 119 | + [35;1m`id_shop`[0m int[0m([32;1m11[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m [37mDEFAULT[0m [34;1m'1'[0m,[0m |
| 120 | + [35;1m`id_currency`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m,[0m |
| 121 | + [35;1m`id_country`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m,[0m |
| 122 | + [35;1m`id_group`[0m int[0m([32;1m10[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m,[0m |
| 123 | + [35;1m`from_quantity`[0m mediumint[0m([32;1m8[0m) [37mUNSIGNED[0m [37mNOT[0m [37mNULL[0m,[0m |
124 | 124 | [35;1m`price`[0m DECIMAL[0m([32;1m20[0m,[0m [32;1m6[0m),[0m |
125 | 125 | [35;1m`reduction`[0m decimal[0m([32;1m20[0m,[0m [32;1m6[0m) [37mNOT[0m [37mNULL[0m,[0m |
126 | 126 | [35;1m`reduction_type`[0m enum[0m([34;1m'amount'[0m,[0m [34;1m'percentage'[0m) [37mNOT[0m [37mNULL[0m,[0m |
|
454 | 454 | [37mALTER TABLE[0m |
455 | 455 | [35;1m`PREFIX_employee`[0m |
456 | 456 | [37mADD[0m |
457 | | - [35;1m`bo_color`[0m varchar[0m([32;1m32[0m) [37mdefault[0m [37mNULL[0m [37mAFTER[0m [35;1m`stats_date_to`[0m |
| 457 | + [35;1m`bo_color`[0m varchar[0m([32;1m32[0m) [37mDEFAULT[0m [37mNULL[0m [37mAFTER[0m [35;1m`stats_date_to`[0m |
458 | 458 | --- |
459 | 459 | [37mINSERT[0m [37mINTO[0m [35;1m`PREFIX_cms_category_lang`[0m |
460 | 460 | [37mVALUES[0m |
|
779 | 779 | [32;1m2[0m,[0m |
780 | 780 | [32;1m3[0m |
781 | 781 | [37mWHERE[0m |
782 | | - a[0m [37min[0m ([32;1m1[0m,[0m [32;1m2[0m,[0m [32;1m3[0m,[0m [32;1m4[0m,[0m [32;1m5[0m) |
783 | | - [37mand[0m b[0m =[0m [32;1m5[0m;[0m |
| 782 | + a[0m [37mIN[0m ([32;1m1[0m,[0m [32;1m2[0m,[0m [32;1m3[0m,[0m [32;1m4[0m,[0m [32;1m5[0m) |
| 783 | + [37mAND[0m b[0m =[0m [32;1m5[0m;[0m |
784 | 784 | --- |
785 | 785 | [37mSELECT[0m |
786 | | - count[0m -[0m [32;1m50[0m |
| 786 | + [35;1m`count`[0m -[0m [32;1m50[0m |
787 | 787 | [37mWHERE[0m |
788 | 788 | a[0m -[0m [32;1m50[0m =[0m b[0m |
789 | 789 | [37mWHERE[0m |
790 | 790 | [32;1m1[0m |
791 | | - [37mand[0m -[0m[32;1m50[0m |
| 791 | + [37mAND[0m -[0m[32;1m50[0m |
792 | 792 | [37mWHERE[0m |
793 | 793 | -[0m[32;1m50[0m =[0m a[0m |
794 | 794 | [37mWHERE[0m |
|
799 | 799 | -[0m[32;1m50[0m |
800 | 800 | [37mWHERE[0m |
801 | 801 | [32;1m1[0m |
802 | | - [37mand[0m -[0m[32;1m50[0m;[0m |
| 802 | + [37mAND[0m -[0m[32;1m50[0m;[0m |
803 | 803 | --- |
804 | 804 | [37mSELECT[0m |
805 | 805 | @[0m |
806 | | - [37mand[0m b[0m;[0m |
| 806 | + [37mAND[0m b[0m;[0m |
807 | 807 | --- |
808 | 808 | [37mSELECT[0m |
809 | 809 | [36;1m@"weird variable name"[0m;[0m |
|
823 | 823 | a[0m |
824 | 824 | [37mFROM[0m |
825 | 825 | b[0m |
826 | | - [37mLEFT OUTER JOIN[0m c[0m [37mon[0m (d[0m =[0m f[0m);[0m |
| 826 | + [37mLEFT OUTER JOIN[0m c[0m [37mON[0m (d[0m =[0m f[0m);[0m |
827 | 827 | --- |
828 | 828 | [37mWITH[0m |
829 | 829 | cte[0m [37mAS[0m ( |
830 | 830 | [37mSELECT[0m |
831 | 831 | a[0m,[0m |
832 | 832 | b[0m |
833 | 833 | [37mFROM[0m |
834 | | - [37mtable[0m |
| 834 | + [35;1m`table`[0m |
835 | 835 | ),[0m |
836 | 836 | [37mRECURSIVE[0m fibonacci[0m (n[0m,[0m fib_n[0m,[0m next_fib_n[0m) [37mAS[0m ( |
837 | 837 | [37mSELECT[0m |
|
0 commit comments