Currency:
1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'al039008_dfrbabr.pov.products_options_values_sort_order' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
in:
[SELECT count(DISTINCT p2a.products_id) as quantity, po.products_options_name, pov.products_options_values_name, SUM(IF(p2a.products_id IN(3716,4243,4127,4348,4039,4312,3988,4234,3932,3990,4098,3972,4080,3737,4256,3837,3750,4123,4209,3731,3893,4466,3732,3960,4257,4241,3889,3917,3815,3891,3823,3753,4468,4086,3702,3826,3933,4163,3744,3953,3759,4035,3991,4332,4357,4445,3770,4219,4315,4148,4285,3941,4344,3919,4329,3997,3831,3929,3788,4400,3777,4271,4414,4458,4387,3848,3920,3906,3907,4051,3757,4318,4474,4346,3776,4177,3925,3832,3793,4058,4242,4447,3866,3755,4408,4427,3878,3911,4337,4393,4383,3927,4222,4153,4012,3973,4437,3719,3845,4386,3995,4235,3703,3908,3707,4456,4210,4152,4118,3722,4375,4250,3768,4020,4338,4056,3968,3830,4455,4119,4171,4365,4165,4403,4314,4063,3890,3829,3721,4328,4284,4459,3822,4010,4043,4156,3867,3937,4014,4440,4225,3855,3745,4294,4237,3956,4317,4026,4313,4226,3766,4138,4336,4381,4349,4099,3780,4199,3976,4471,3794,4121,3971,3834,4287,4143,3839,4394,3974,4216,4281,3817,3951,4168,3706,3714,3978,3791,4091,4465,3939,4013,4230,4321,3884,4361,3969,4295,4005,3809,3843,3709,3811,4011,4089,4429,3773,4340,4310,4090,3980,4457,4439,4402,3717,3821,4032,3807,4000,4028,4069,4333,4263,4206,4184,3842,4345,4025,4135,4305,4415,4021,3844,4053,3774,4136,4302,4446,3763,3828,3767,3950,3882,4397,4433,3835,3883,4111,3726,4158,3752,4262,4416,4363,3833,4182,3945,4214,4009,4422,3881,4461,3810,4083,3724,4017,3872,4380,4040,3894,4067,4200,4367,4102,4110,4078,4130,3994,3847,4173,4188,3861,3918,4031,3934,4178,3873,4139,3940,4060,4103,4260,4292,4324,4232,4330,4160,4353,4038,4097,3875,4244,4360,4059,4350,4218,3930,4217,3849,4044,3825,4095,4269,3944,4070,4189,4270,4412,4045,3913,4436,4055,3741,4410,4343,4233,3962,4453,4306,3728,4164,3733,3840,4113,4401,4004,4224,4006,4290,4389,4464,3805,4472,4132,3895,4273,3736,3749,4475,3946,3903,4155,3877,4066,3910,3800,4212,4142,3924,4197,4297,4075,4106,4016,3730,4193,4190,3841,4100,4385,4150,4101,4377,3814,3725,4024,3949,3820,4444,3801,3998,4172,3905,3952,3758,4266,4278,4114,3901,4251,4064,3803,4194,3836,4207,3993,3738,4154,4334,4451,3948,4175,4162,4071,4282,3871,3715,3802,3765,4167,4322,4072,4076,4041,4327,3762,4304,3954,4087,4443,4186,3868,3938,4283,3899,3886,4029,4405,4384,3704,4275,4347,4449,4147,4435,4296,4180,4174,4307,4438,4183,3964,4023,3909,4362,4144,4105,3761,3984,4061,4255,4037,4460,4419,3863,3999,4140,3735,3926,4131,4246,4288,3983,4404,3816,3885,3795,3778,4205,4426,4274,4293,4356,4108,4074,3720,3955,4204,3857,4371,3921,3756,3898,4236,4291,3922,4112,4467,4309,3987,3982,4406,3838,4117,4042,4364,4050,4022,3947,4351,3818,4137,3775,4454,4159,4220,4369,4379,3850,4342,4247,4452,3808,4094,3786,3789,3711,4073,4420,4417,4448,3812,4352,4002,4169,4424,4018,4015,3915,4191,3862,4215,4373,4301,3979,3727,4088,3904,3935,3860,4300,3742,4325,3900,3792,3729,4411,4398,4170,4279,4054,4008,4258,4358,4280,4418,3870,4120,3928,3992,3764,3846,4253,3864,4049,3708,4286,3799,3965,4326,4399,3989,4463,3963,4277,3869,4388,3854,4396,4372,3876,4238,3712,4201,4390,3701,4261,4141,4228,4259,4245,4198,4299,3985,3806,3751,4166,3787,4428,3936,4249,4221,3958,3879,4289,3710,4323,4202,4107,4308,4057,4462,4003,4331,4116,4231,4115,3796,4320,3804,3760,3769,4382,3975,4423,4030,3853,3739,3981,4079,4077,4268,4048,4391,4432,4319,4062,4203,4001,4179,4430,3880,4223,3705,3914,3970,3923,3943,4316,4081,3740,4019,4355,3942,4421,3874,4354,4378,3713,4248,3977,4264,3959,4376,3785,4185,3967,4157,4227,4192,3851,3986,4085,3897,3916,3797,3748,3961,4425,3852,4007,3783,4145,3892,3790,4229,3957,4303,3771,3931,4272,3772,4034,4093,4109,4240,4298,4407,4125,4442,3996,4441,3734,4084,4151,4252,3781,3824,3859,4366,4409,4129,4473,4082,3746,3827,3888,4470,4450,4339,3819,4211,4134,4469,4434,4126,4036,4392,4033,3743,4096,4341,4161,3865,4124,4068,4195,4047,4368,3798,4149,4046,4104,4359,3754,4122,3966,4276,4311,4213,4413,4181,3856,3813,4431,4374,4133,4065,3718,3902,4092,3784,4146,4196,4052,4176,4335,3858,4395,4254,4265,3779,4239,3887,4027,3747,4267,4128,4187,3723,3896,3912,4370,4208,3782), 1, 0)) as flag FROM products_attributes p2a JOIN products_options po ON p2a.options_id = po.products_options_id JOIN products_options_values pov ON p2a.options_values_id = pov.products_options_values_id WHERE po.products_options_id>2 and p2a.products_id IN (3701,3702,3703,3704,3705,3706,3707,3708,3709,3710,3711,3712,3713,3714,3715,3716,3717,3718,3719,3720,3721,3722,3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3740,3741,3742,3743,3744,3745,3746,3747,3748,3749,3750,3751,3752,3753,3754,3755,3756,3757,3758,3759,3760,3761,3762,3763,3764,3765,3766,3767,3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778,3779,3780,3781,3782,3783,3784,3785,3786,3787,3788,3789,3790,3791,3792,3793,3794,3795,3796,3797,3798,3799,3800,3801,3802,3803,3804,3805,3806,3807,3808,3809,3810,3811,3812,3813,3814,3815,3816,3817,3818,3819,3820,3821,3822,3823,3824,3825,3826,3827,3828,3829,3830,3831,3832,3833,3834,3835,3836,3837,3838,3839,3840,3841,3842,3843,3844,3845,3846,3847,3848,3849,3850,3851,3852,3853,3854,3855,3856,3857,3858,3859,3860,3861,3862,3863,3864,3865,3866,3867,3868,3869,3870,3871,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885,3886,3887,3888,3889,3890,3891,3892,3893,3894,3895,3896,3897,3898,3899,3900,3901,3902,3903,3904,3905,3906,3907,3908,3909,3910,3911,3912,3913,3914,3915,3916,3917,3918,3919,3920,3921,3922,3923,3924,3925,3926,3927,3928,3929,3930,3931,3932,3933,3934,3935,3936,3937,3938,3939,3940,3941,3942,3943,3944,3945,3946,3947,3948,3949,3950,3951,3952,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,3965,3966,3967,3968,3969,3970,3971,3972,3973,3974,3975,3976,3977,3978,3979,3980,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,3992,3993,3994,3995,3996,3997,3998,3999,4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4058,4059,4060,4061,4062,4063,4064,4065,4066,4067,4068,4069,4070,4071,4072,4073,4074,4075,4076,4077,4078,4079,4080,4081,4082,4083,4084,4085,4086,4087,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,4125,4126,4127,4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,4138,4139,4140,4141,4142,4143,4144,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,4158,4159,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4170,4171,4172,4173,4174,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4189,4190,4191,4192,4193,4194,4195,4196,4197,4198,4199,4200,4201,4202,4203,4204,4205,4206,4207,4208,4209,4210,4211,4212,4213,4214,4215,4216,4217,4218,4219,4220,4221,4222,4223,4224,4225,4226,4227,4228,4229,4230,4231,4232,4233,4234,4235,4236,4237,4238,4239,4240,4241,4242,4243,4244,4245,4246,4247,4248,4249,4250,4251,4252,4253,4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,4271,4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,4288,4289,4290,4291,4292,4293,4294,4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307,4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,4327,4328,4329,4330,4331,4332,4333,4334,4335,4336,4337,4338,4339,4340,4341,4342,4343,4344,4345,4346,4347,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,4358,4359,4360,4361,4362,4363,4364,4365,4366,4367,4368,4369,4370,4371,4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,4417,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,4443,4444,4445,4446,4447,4448,4449,4450,4451,4452,4453,4454,4455,4456,4457,4458,4459,4460,4461,4462,4463,4464,4465,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]