SELECTcount(DISTINCTp0_.id) ASsclr_0FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town=?) LEFT JOINvendor_priorityv2_ON (LOWER(v2_.vendor) =LOWER(p0_.vendor)) LEFT JOINvendor_priorityv3_ON (LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)) WHERE ((p0_.width=?ANDp0_.height=?ANDp0_.design=?ANDp0_.diameter=?) AND (p0_.available=true)) ANDp0_.p_typeIN ('1') GROUP BYp0_.id,v2_.priority,v3_.priority
SELECTcount(DISTINCTp0_.id) ASsclr_0FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town=?)
LEFT JOINvendor_priorityv2_ON (
LOWER(v2_.vendor) =LOWER(p0_.vendor)
)
LEFT JOINvendor_priorityv3_ON (
LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)
)
WHERE
(
(
p0_.width=?ANDp0_.height=?ANDp0_.design=?ANDp0_.diameter=?
)
AND (p0_.available=true)
)
ANDp0_.p_typeIN ('1')
GROUP BYp0_.id,v2_.priority,v3_.priority
SELECTcount(DISTINCTp0_.id) ASsclr_0FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town='www') LEFT JOINvendor_priorityv2_ON (LOWER(v2_.vendor) =LOWER(p0_.vendor)) LEFT JOINvendor_priorityv3_ON (LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)) WHERE ((p0_.width='225'ANDp0_.height='45'ANDp0_.design='R'ANDp0_.diameter='16') AND (p0_.available=true)) ANDp0_.p_typeIN ('1') GROUP BYp0_.id,v2_.priority,v3_.priority;
SELECTDISTINCTp0_.idASid_0,MAX(CASEWHENr1_.countISNULLTHEN0ELSE1END) ASsclr_1,COALESCE(v2_.priority,99999) ASsclr_2,COALESCE(v3_.priority,99999) ASsclr_3,p0_.vendorASvendor_4,p0_.modelASmodel_5FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town=?) LEFT JOINvendor_priorityv2_ON (LOWER(v2_.vendor) =LOWER(p0_.vendor)) LEFT JOINvendor_priorityv3_ON (LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)) WHERE ((p0_.width=?ANDp0_.height=?ANDp0_.design=?ANDp0_.diameter=?) AND (p0_.available=true)) ANDp0_.p_typeIN ('1') GROUP BYp0_.id,v2_.priority,v3_.priorityORDER BYsclr_1DESC,sclr_2ASC,sclr_3ASC,p0_.vendorASC,p0_.modelASCLIMIT5
SELECTDISTINCTp0_.idASid_0,MAX(
CASEWHENr1_.countISNULLTHEN0ELSE1END
) ASsclr_1,COALESCE(v2_.priority,99999) ASsclr_2,COALESCE(v3_.priority,99999) ASsclr_3,p0_.vendorASvendor_4,p0_.modelASmodel_5FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town=?)
LEFT JOINvendor_priorityv2_ON (
LOWER(v2_.vendor) =LOWER(p0_.vendor)
)
LEFT JOINvendor_priorityv3_ON (
LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)
)
WHERE
(
(
p0_.width=?ANDp0_.height=?ANDp0_.design=?ANDp0_.diameter=?
)
AND (p0_.available=true)
)
ANDp0_.p_typeIN ('1')
GROUP BYp0_.id,v2_.priority,v3_.priorityORDER BYsclr_1DESC,sclr_2ASC,sclr_3ASC,p0_.vendorASC,p0_.modelASCLIMIT5
SELECTDISTINCTp0_.idASid_0,MAX(CASEWHENr1_.countISNULLTHEN0ELSE1END) ASsclr_1,COALESCE(v2_.priority,99999) ASsclr_2,COALESCE(v3_.priority,99999) ASsclr_3,p0_.vendorASvendor_4,p0_.modelASmodel_5FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town='www') LEFT JOINvendor_priorityv2_ON (LOWER(v2_.vendor) =LOWER(p0_.vendor)) LEFT JOINvendor_priorityv3_ON (LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)) WHERE ((p0_.width='225'ANDp0_.height='45'ANDp0_.design='R'ANDp0_.diameter='16') AND (p0_.available=true)) ANDp0_.p_typeIN ('1') GROUP BYp0_.id,v2_.priority,v3_.priorityORDER BYsclr_1DESC,sclr_2ASC,sclr_3ASC,p0_.vendorASC,p0_.modelASCLIMIT5;
SELECTcount(DISTINCTp0_.id) ASsclr_0FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town=?) LEFT JOINvendor_priorityv2_ON (LOWER(v2_.vendor) =LOWER(p0_.vendor)) LEFT JOINvendor_priorityv3_ON (LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)) WHERE ((p0_.width=?ANDp0_.diameter=?ANDp0_.et=?ANDp0_.calculated_pcd=?ANDp0_.hole>=?) AND (p0_.available=true)) ANDp0_.p_typeIN ('2') GROUP BYp0_.id,v2_.priority,v3_.priority
SELECTcount(DISTINCTp0_.id) ASsclr_0FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town=?)
LEFT JOINvendor_priorityv2_ON (
LOWER(v2_.vendor) =LOWER(p0_.vendor)
)
LEFT JOINvendor_priorityv3_ON (
LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)
)
WHERE
(
(
p0_.width=?ANDp0_.diameter=?ANDp0_.et=?ANDp0_.calculated_pcd=?ANDp0_.hole>=?
)
AND (p0_.available=true)
)
ANDp0_.p_typeIN ('2')
GROUP BYp0_.id,v2_.priority,v3_.priority
SELECTcount(DISTINCTp0_.id) ASsclr_0FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town='www') LEFT JOINvendor_priorityv2_ON (LOWER(v2_.vendor) =LOWER(p0_.vendor)) LEFT JOINvendor_priorityv3_ON (LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)) WHERE ((p0_.width='6'ANDp0_.diameter='15'ANDp0_.et='48'ANDp0_.calculated_pcd='5 x 100'ANDp0_.hole>='56.1') AND (p0_.available=true)) ANDp0_.p_typeIN ('2') GROUP BYp0_.id,v2_.priority,v3_.priority;
SELECTDISTINCTp0_.idASid_0,MAX(CASEWHENr1_.countISNULLTHEN0ELSE1END) ASsclr_1,COALESCE(v2_.priority,99999) ASsclr_2,COALESCE(v3_.priority,99999) ASsclr_3,p0_.vendorASvendor_4,p0_.modelASmodel_5FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town=?) LEFT JOINvendor_priorityv2_ON (LOWER(v2_.vendor) =LOWER(p0_.vendor)) LEFT JOINvendor_priorityv3_ON (LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)) WHERE ((p0_.width=?ANDp0_.diameter=?ANDp0_.et=?ANDp0_.calculated_pcd=?ANDp0_.hole>=?) AND (p0_.available=true)) ANDp0_.p_typeIN ('2') GROUP BYp0_.id,v2_.priority,v3_.priorityORDER BYsclr_1DESC,sclr_2ASC,sclr_3ASC,p0_.vendorASC,p0_.modelASCLIMIT5
SELECTDISTINCTp0_.idASid_0,MAX(
CASEWHENr1_.countISNULLTHEN0ELSE1END
) ASsclr_1,COALESCE(v2_.priority,99999) ASsclr_2,COALESCE(v3_.priority,99999) ASsclr_3,p0_.vendorASvendor_4,p0_.modelASmodel_5FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town=?)
LEFT JOINvendor_priorityv2_ON (
LOWER(v2_.vendor) =LOWER(p0_.vendor)
)
LEFT JOINvendor_priorityv3_ON (
LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)
)
WHERE
(
(
p0_.width=?ANDp0_.diameter=?ANDp0_.et=?ANDp0_.calculated_pcd=?ANDp0_.hole>=?
)
AND (p0_.available=true)
)
ANDp0_.p_typeIN ('2')
GROUP BYp0_.id,v2_.priority,v3_.priorityORDER BYsclr_1DESC,sclr_2ASC,sclr_3ASC,p0_.vendorASC,p0_.modelASCLIMIT5
SELECTDISTINCTp0_.idASid_0,MAX(CASEWHENr1_.countISNULLTHEN0ELSE1END) ASsclr_1,COALESCE(v2_.priority,99999) ASsclr_2,COALESCE(v3_.priority,99999) ASsclr_3,p0_.vendorASvendor_4,p0_.modelASmodel_5FROMproductp0_LEFT JOINrestr1_ONp0_.id=r1_.product_idAND (r1_.town='www') LEFT JOINvendor_priorityv2_ON (LOWER(v2_.vendor) =LOWER(p0_.vendor)) LEFT JOINvendor_priorityv3_ON (LOWER(v3_.vendor) =LOWER(p0_.vendor||' '||p0_.model)) WHERE ((p0_.width='6'ANDp0_.diameter='15'ANDp0_.et='48'ANDp0_.calculated_pcd='5 x 100'ANDp0_.hole>='56.1') AND (p0_.available=true)) ANDp0_.p_typeIN ('2') GROUP BYp0_.id,v2_.priority,v3_.priorityORDER BYsclr_1DESC,sclr_2ASC,sclr_3ASC,p0_.vendorASC,p0_.modelASCLIMIT5;